;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:48:42 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/rect.el ;;; emacs version 19.28.90.26. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "`/gd/gnu/emacs/19.0/lisp/rect.el' was compiled for Emacs 19")) #@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) "À‰‰‰Š bˆiÆyˆ`)ŠbˆiÈyˆÉ )\n\fWƒ,\n\fŠ bˆ` WƒzÀ‰‰\n \fÍ\f\"ˆi\fZ `\fÍ\n\"ˆ\niZ\n ÆWƒi\n \\\nÆ \f \n#ˆ+Èyˆ‚0)\n\fZ,‡" [nil endlinepos endcol startlinepos startcol start 0 end 1 point-marker endextra begextra startpos move-to-column coerce-tabs function] 4 (#$ . 478)]) (defalias 'delete-rectangle-line #[(startdelpos ignore ignore) "`|‡" [startdelpos] 2]) (defalias 'delete-extract-rectangle-line #[(startdelpos begextra endextra) "ŠÀ \n #ˆ) `|‡" [extract-rectangle-line startdelpos begextra endextra] 4]) (defalias 'extract-rectangle-line #[(startdelpos begextra endextra) "`{`bˆÃÄ Å#ƒ6iŠÆuˆi)Z\nÈ` ZÉZOÊ!\n‰G` Z\\ËOQ)‚ \fÈV„D ÈVƒOÊ\f!\nÊ !Q\nB‰*‡" [startdelpos end line search-forward " " t -1 width 0 1 spaces-string nil begextra endextra lines] 6]) (byte-code "ÀÁ\nBÁ‡" [["" " " " " " " " " " " " " " " " "] spaces-strings current-load-list] 2) (defalias 'spaces-string #[(n) "ÁXƒ\n\nH‡ÃÁVƒÅ\fPÁZ‰‚ \f\nHP)‡" [n 8 spaces-strings "" val " "] 4]) #@216 Delete (don't save) text in rectangle with point and mark as corners. 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. (defalias 'delete-rectangle #[(start end) "ÀÁ\n Ä$‡" [operate-on-rectangle delete-rectangle-line start end t] 5 (#$ . 2147) "r"]) #@190 Delete contents of rectangle and return it as a list of strings. Arguments START and END are the corners of the rectangle. The value is list of strings, one for each line of the rectangle. (defalias 'delete-extract-rectangle #[(start end) "ÀÂÃ\f Æ$ˆ Ÿ)‡" [nil lines operate-on-rectangle delete-extract-rectangle-line start end t] 5 (#$ . 2499)]) #@123 Return contents of rectangle with corners at START and END. Value is list of strings, one for each line of the rectangle. (defalias 'extract-rectangle #[(start end) "ÀÂÃ\f À$ˆ Ÿ)‡" [nil lines operate-on-rectangle extract-rectangle-line start end] 5 (#$ . 2853)]) #@41 Rectangle for yank-rectangle to insert. (defvar killed-rectangle nil (#$ . 3123)) #@214 Delete rectangle with corners at point and mark; save as last killed one. Calling from program, supply two args START and END, buffer positions. But in programs you might prefer to use `delete-extract-rectangle'. (defalias 'kill-rectangle #[(start end) "ƒ\fÁ\n \"Å ˆÆ\n \"‰‡" [buffer-read-only extract-rectangle start end killed-rectangle barf-if-buffer-read-only delete-extract-rectangle] 3 (#$ . 3212) "r"]) #@65 Yank the last killed rectangle with upper left corner at point. (defalias 'yank-rectangle #[nil "À !‡" [insert-rectangle killed-rectangle] 2 (#$ . 3632) nil]) #@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ÁÅ ˆ\f….\n„ Æyˆn„ÇcˆÈ Á\"ˆÉ\f@cˆ\fA‰„ É+‡" [rectangle t first insertcolumn lines push-mark 1 10 move-to-column nil] 4 (#$ . 3798)]) #@194 Blank out rectangle with corners at point and mark, 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. (defalias 'open-rectangle #[(start end) "ÀÁ\n Ä$ˆ\nb‡" [operate-on-rectangle open-rectangle-line start end nil] 5 (#$ . 4299) "r"]) (defalias 'open-rectangle-line #[(startpos begextra endextra) "i\\Á\fbˆi ZÇÁwˆiZ)\f`|ˆ \n\\j*‡" [endextra nil whitewidth endcol startpos begextra begcol " "] 2]) #@267 Insert STRING on each line of the region-rectangle, shifting text right. The left edge of the rectangle specifies the column for insertion. This command does not delete or overwrite any existing text. Called from a program, takes three args; START, END and STRING. (defalias 'string-rectangle #[(start end string) "ÀÁ\n Ä$‡" [operate-on-rectangle string-rectangle-line start end t] 5 (#$ . 4802) "r\nsString rectangle: "]) (defalias 'string-rectangle-line #[(startpos begextra endextra) "À\nbˆiÄÀwˆi Z)\n`|ˆ cˆi \\j)‡" [nil whitespace startpos ocol " " string] 2]) #@190 Blank out rectangle with corners at point and mark. The text previously in the region is overwritten by the blanks. When called from a program, requires two args which specify the corners. (defalias 'clear-rectangle #[(start end) "ÀÁ\n Ä$‡" [operate-on-rectangle clear-rectangle-line start end t] 5 (#$ . 5379) "r"]) (defalias 'clear-rectangle-line #[(startpos begextra endextra) "ÀÁwˆi\n\\`\fbˆÀÁxˆ`|ˆ j)‡" [" " nil endextra column startpos] 3]) (provide (quote rect))