;ELC   
;;; Compiled by rms@psilocin.ai.mit.edu on Sat Jun  6 14:10:44 1998
;;; from file /gd/gnu/emacs/lisp/rect.el
;;; in Emacs version 20.2.94.1
;;; with bytecomp version 2.45
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`rect.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\301B\301\207" [current-load-list operate-on-rectangle-lines] 2)
#@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\307y\210`)\212b\210i\310y\210\311 )	W\203+ 	\212\nb\210`W\203\210 \306\211\211\f\312\"\210iZ`\312	\"\210\204a i	V\203a \313\310!\210	iZ\f\307W\203w \f\\\f\307\f#\210+\310y\210\202/ )	Z,\207" [endlinepos endcol startlinepos startcol start end nil 0 1 point-marker move-to-column backward-char endextra begextra startpos coerce-tabs function] 4 (#$ . 676)])
(defalias 'delete-rectangle-line #[(startdelpos ignore ignore) "`|\207" [startdelpos] 2])
(defalias 'delete-extract-rectangle-line #[(startdelpos begextra endextra) "\212\303	\n#\210)`|\207" [startdelpos begextra endextra extract-rectangle-line] 4])
(defalias 'extract-rectangle-line #[(startdelpos begextra endextra) "`{`b\210\306\307	\310#\2034 i\212\311u\210i)Z\n\312`	Z\313ZO\314!\n\211G`	Z\\\315OQ)\202	 \f\312V\204@ \312V\203I \314\f!\n\314!Q\nB\211*\207" [startdelpos end line width begextra endextra search-forward "	" t -1 0 1 spaces-string nil operate-on-rectangle-lines] 6])
(byte-code "\302\300	B\300\207" [spaces-strings current-load-list ["" " " "  " "   " "    " "     " "      " "       " "        "]] 2)
(defalias 'spaces-string #[(n) "\303X\203\n 	H\207\304\303V\203 \305\nP\303Z\211\202 \n	HP)\207" [n spaces-strings val 8 "" "        "] 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) "\302\303	\304$\207" [start end operate-on-rectangle delete-rectangle-line t] 5 (#$ . 2614) "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) "\303\304\305	\n\306$\210\237)\207" [operate-on-rectangle-lines start end nil operate-on-rectangle delete-extract-rectangle-line t] 5 (#$ . 2977)])
#@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) "\303\304\305	\n\303$\210\237)\207" [operate-on-rectangle-lines start end nil operate-on-rectangle extract-rectangle-line] 5 (#$ . 3373)])
#@41 Rectangle for yank-rectangle to insert.
(defvar killed-rectangle nil (#$ . 3685))
#@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) "\203\f \304	\n\"\305 \210\306	\n\"\211\207" [buffer-read-only start end killed-rectangle extract-rectangle barf-if-buffer-read-only delete-extract-rectangle] 3 (#$ . 3774) "r"])
#@65 Yank the last killed rectangle with upper left corner at point.
(defalias 'yank-rectangle #[nil "\301!\207" [killed-rectangle insert-rectangle] 2 (#$ . 4215) 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\304\305 \210\205. 	\204  \306y\210n\204 \307c\210\310\n\304\"\210\311@c\210A\211\204 \311+\207" [rectangle first insertcolumn lines t push-mark 1 10 move-to-column nil] 4 (#$ . 4387)])
#@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) "\302\303	\304$\210b\207" [start end operate-on-rectangle open-rectangle-line nil] 5 (#$ . 4942) "r"])
(defalias 'open-rectangle-line #[(startpos begextra endextra) "i\\\306b\210i\fZ\307\306w\210iZ)`|\210\n	\\j*\207" [endextra whitewidth endcol startpos begextra begcol nil " 	"] 2])
#@270 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.
(defalias 'close-rectangle #[(start end) "\302\303	\304$\207" [start end operate-on-rectangle (lambda (startpos begextra endextra) (save-excursion (goto-char startpos) (delete-region (point) (progn (skip-syntax-forward " ") (point))))) t] 5 (#$ . 5476) "r"])
(byte-code "\301B\301\207" [current-load-list string-rectangle-string] 2)
#@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) "\304\305\n\306$)\207" [string string-rectangle-string start end operate-on-rectangle string-rectangle-line t] 5 (#$ . 6088) "r\nsString rectangle: "])
(defalias 'string-rectangle-line #[(startpos begextra endextra) "\304	`|\210i\305\304w\210i\nZ)	`|\210c\210i\\j)\207" [whitespace startpos ocol string-rectangle-string nil " 	"] 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) "\302\303	\304$\207" [start end operate-on-rectangle clear-rectangle-line t] 5 (#$ . 6670) "r"])
(defalias 'clear-rectangle-line #[(startpos begextra endextra) "\303\304w\210i\\`\nb\210\303\304x\210`|\210	j)\207" [endextra column startpos " 	" nil] 3])
(provide 'rect)
