?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/rect.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:29 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/rect.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@541 Call FUNCTION for each line of rectangle with corners at START, END. If COERCE-TABS is non-nil, convert multi-column characters that span the starting or ending columns on any line to multiple spaces before calling FUNCTION. FUNCTION is called with three arguments: position of start of segment of this line within the rectangle, number of columns that belong to rectangle but are before that position, number of columns that belong to rectangle but are after point. Point is at the end of the segment of this line within the rectangle. (defalias 'operate-on-rectangle #[(function start end coerce-tabs) "\306\211\211\211\212\fb\210i\307 \210`)\212 b\210i\310y\210\311 ) W\203+ \212\nb\210`W\203\235 \306\211\211\203K \312\313\"\210\202O \312!\210iZ`\203d \312 \313\"\210\202h \312 !\210\204v i V\203v \314u\210 iZ\315W\203\214 \\\315#\210+\310y\210\202/ ) Z,\207" [endlinepos endcol startlinepos startcol start end nil beginning-of-line 1 point-marker move-to-column t -1 0 endextra begextra startpos coerce-tabs function] 4 (#$ . 548)]) #@303 Call FUNCTION for each line of rectangle with corners at START, END. FUNCTION is called with two arguments: the start and end columns of the rectangle, plus ARGS extra arguments. Point is at the beginning of line when the function is called. The final point after the last operation will be returned. (defalias 'apply-on-rectangle #[(function start end &rest args) "\306\211\211\211\211\212 b\210i\307 \210`b\210i\310y\210\311 \n\fW\2030 \f\f\n\f)b\210` W\203J \312 \f\n$\210`\310y\210\2023 )-\207" [final-point endpt endcol startpt startcol start nil beginning-of-line 1 point-marker apply end col function args] 5 (#$ . 1651)]) (defalias 'delete-rectangle-line #[(startcol endcol fill) "\303 \203\n \304\202 \305\"U\205 `\303\n\305\"\210`|\207" [startcol fill endcol move-to-column t coerce] 4]) (defalias 'delete-extract-rectangle-line #[(startcol endcol lines fill) "\305 \306 \n\203 \307\202 \310\" W\203! \311\f Z!AB\241\2022 `\306\f\307\"\210\312`\307#AB\241)\207" [pt startcol fill lines endcol point-at-eol move-to-column t coerce spaces-string filter-buffer-substring] 5]) (defalias 'extract-rectangle-line #[(startcol endcol lines) "\306\211\211\211\211\307 !\210`i Z\307!\210`iZ\f`{\n\310W\2030 \n\\\310 \310W\2038 \310\fb\210\311\312\313#\203h i\212\314u\210i)Z\310\315`\316#O\317!\211G`Z\\\306OQ)\202; \n\310V\204t \310V\203} \317\n!\317 !QAB\241-\207" [line endextra begextra end start startcol nil move-to-column 0 search-forward " " t -1 - 1 spaces-string endcol width lines] 6]) (defconst spaces-strings ["" " " " " " " " " " " " " " " " "]) #@32 Return a string with N spaces. (defalias 'spaces-string #[(n) "\302X\203\n H\207\303\304\"\207" [n spaces-strings 8 make-string 32] 3 (#$ . 3316)]) #@352 Delete (don't save) text in the region-rectangle. The same range of columns is deleted in each line starting with the line where the region begins and ending with the line where the region ends. When called from a program the rectangle's corners are START and END. With a prefix (or a FILL) argument, also fill lines where nothing has to be deleted. (defalias 'delete-rectangle #[(start end &optional fill) "\303\304 \n$\207" [start end fill apply-on-rectangle delete-rectangle-line] 5 (#$ . 3475) "*r\nP"]) #@289 Delete the contents of the rectangle with corners at START and END. Return it as a list of strings, one for each line of the rectangle. When called from a program the rectangle's corners are START and END. With an optional FILL argument, also fill lines where nothing has to be deleted. (defalias 'delete-extract-rectangle #[(start end &optional fill) "\304C\305\306 \n%\210A\237)\207" [lines start end fill nil apply-on-rectangle delete-extract-rectangle-line] 6 (#$ . 3992)]) #@137 Return the contents of the rectangle with corners at START and END. Return it as a list of strings, one for each line of the rectangle. (defalias 'extract-rectangle #[(start end) "\303C\304\305 \n$\210A\237)\207" [lines start end nil apply-on-rectangle extract-rectangle-line] 5 (#$ . 4482)]) #@43 Rectangle for `yank-rectangle' to insert. (defvar killed-rectangle nil (#$ . 4784)) #@568 Delete the region-rectangle and save it as the last killed one. When called from a program the rectangle's corners are START and END. You might prefer to use `delete-extract-rectangle' from a program. With a prefix (or a FILL) argument, also fill lines where nothing has to be deleted. If the buffer is read-only, Emacs will beep and refrain from deleting the rectangle, but put it in the kill ring anyway. This means that you can use this command to copy text from a read-only buffer. (If the variable `kill-read-only-ok' is non-nil, then this won't even beep.) (defalias 'kill-rectangle #[(start end &optional fill) "\300\301\302\217\207" [nil (byte-code "\304 \n#\211\207" [start end fill killed-rectangle delete-extract-rectangle] 4) (((buffer-read-only text-read-only) (byte-code "\305\306 \n\"\f\203 \307\310!\210\311\207\312 \210\313\314pC\"\207" [deactivate-mark start end killed-rectangle kill-read-only-ok t extract-rectangle message "Read only text copied to kill ring" nil barf-if-buffer-read-only signal text-read-only] 3)))] 3 (#$ . 4875) "r\nP"]) #@63 Copy the region-rectangle and save it as the last killed one. (defalias 'copy-rectangle-as-kill #[(start end) "\304 \"\305\306\307!\205 \310\n@G!\207" [start end killed-rectangle deactivate-mark extract-rectangle t called-interactively-p interactive indicate-copied-region] 3 (#$ . 5952) "r"]) #@65 Yank the last killed rectangle with upper left corner at point. (defalias 'yank-rectangle #[nil "\301!\207" [killed-rectangle insert-rectangle] 2 (#$ . 6256) "*"]) #@308 Insert text of RECTANGLE with upper left corner at point. RECTANGLE's first line is inserted at point, its second line is inserted at a point vertically under point, etc. RECTANGLE should be a list of strings. After this command, the mark is at the upper left corner and point is at the lower right corner. (defalias 'insert-rectangle #[(rectangle) "i\304\305 \210\205/ \204 \306y\210n\204 \307c\210\310\n\304\"\210\311\312@!\210A\211\204 \311+\207" [rectangle first insertcolumn lines t push-mark 1 10 move-to-column nil insert-for-yank] 4 (#$ . 6428)]) #@360 Blank out the region-rectangle, shifting text right. The text previously in the region is not overwritten by the blanks, but instead winds up to the right of the rectangle. When called from a program the rectangle's corners are START and END. With a prefix (or a FILL) argument, fill with blanks even if there is no text on the right side of the rectangle. (defalias 'open-rectangle #[(start end &optional fill) "\303\304 \n$\210b\207" [start end fill apply-on-rectangle open-rectangle-line] 5 (#$ . 7003) "*r\nP"]) (defalias 'open-rectangle-line #[(startcol endcol fill) "\303 \203\n \304\202 \305\"U\205 ?\205 `\306 U?\205 \nj\207" [startcol fill endcol move-to-column t coerce point-at-eol] 3]) (defalias 'delete-whitespace-rectangle-line #[(startcol _endcol fill) "\302 \203\n \303\202 \304\"U\205 `\305 U?\205 `\306\307!\210`|\207" [startcol fill move-to-column t coerce point-at-eol skip-syntax-forward " "] 3]) (defalias 'close-rectangle 'delete-whitespace-rectangle) #@404 Delete all whitespace following a specified column in each line. The left edge of the rectangle specifies the position in each line at which whitespace deletion should begin. On each line in the rectangle, all continuous whitespace starting at that column is deleted. When called from a program the rectangle's corners are START and END. With a prefix (or a FILL) argument, also fill too short lines. (defalias 'delete-whitespace-rectangle #[(start end &optional fill) "\303\304 \n$\207" [start end fill apply-on-rectangle delete-whitespace-rectangle-line] 5 (#$ . 8001) "*r\nP"]) (defvar string-rectangle-history nil) (defalias 'string-rectangle-line #[(startcol endcol string delete) "\304\305\"\210 \203 \306\n\307#\210c\207" [startcol delete endcol string move-to-column t delete-rectangle-line nil] 4]) #@185 Replace rectangle contents with STRING on each line. The length of STRING need not be the same as the rectangle width. Called from a program, takes three args; START, END and STRING. (defalias 'string-rectangle #[(start end string) "\303\304 \n\305%b\207" [start end string apply-on-rectangle string-rectangle-line t] 6 (#$ . 8823) (progn (barf-if-buffer-read-only) (list (region-beginning) (region-end) (read-string (format "String rectangle (default %s): " (or (car string-rectangle-history) "")) nil 'string-rectangle-history (car string-rectangle-history))))]) (defalias 'replace-rectangle 'string-rectangle) #@270 Insert STRING on each line of region-rectangle, shifting text right. When called from a program, the rectangle's corners are START and END. The left edge of the rectangle specifies the column for insertion. This command does not delete or overwrite any existing text. (defalias 'string-insert-rectangle #[(start end string) "\303\304 \n\305%\207" [start end string apply-on-rectangle string-rectangle-line nil] 6 (#$ . 9445) (progn (barf-if-buffer-read-only) (list (region-beginning) (region-end) (read-string (format "String insert rectangle (default %s): " (or (car string-rectangle-history) "")) nil 'string-rectangle-history (car string-rectangle-history))))]) #@269 Blank out the region-rectangle. The text previously in the region is overwritten with blanks. When called from a program the rectangle's corners are START and END. With a prefix (or a FILL) argument, also fill with blanks the parts of the rectangle which were empty. (defalias 'clear-rectangle #[(start end &optional fill) "\303\304 \n$\207" [start end fill apply-on-rectangle clear-rectangle-line] 5 (#$ . 10119) "*r\nP"]) (defalias 'clear-rectangle-line #[(startcol endcol fill) "\304 \305 \n\203 \306\202 \307\" U\2058 \n\204) \212b\210i)X\203) `|\2028 `\305\306\"\210i`|\210j)\207" [pt startcol fill endcol point-at-eol move-to-column t coerce] 3]) (defalias 'rectangle-number-line-callback #[(start _end format-string) "\303\304\"\210\305 \n\"c\210\nT\211\207" [start format-string rectangle-number-line-counter move-to-column t format] 3]) (defalias 'rectange--default-line-number-format #[(start end start-at) "\303\304\211\305 \"\n\\!G!\306Q\207" [start end start-at "%" int-to-string count-lines "d "] 6]) #@299 Insert numbers in front of the region-rectangle. START-AT, if non-nil, should be a number from which to begin counting. FORMAT, if non-nil, should be a format string to pass to `format' along with the line count. When called interactively with a prefix argument, prompt for START-AT and FORMAT. (defalias 'rectangle-number-lines #[(start end start-at &optional format) "\204\n \305 \n#\306\307 \n$)\207" [format start end start-at rectangle-number-line-counter rectange--default-line-number-format apply-on-rectangle rectangle-number-line-callback] 5 (#$ . 11157) (byte-code "\203 \304 \305 \306\307\310\" \n\311\312\313 \n#\"F+\207\304 \305 \310\314F\207" [current-prefix-arg start end start-at region-beginning region-end read-number "Number to count from: " 1 read-string "Format string: " rectange--default-line-number-format nil] 9)]) (provide 'rect)