;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue Apr 25 18:03:46 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/picture.el ;;; emacs version 19.28.90.40. ;;; 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/picture.el' was compiled for Emacs 19")) #@165 Move to column COLUMN in current line. Differs from `move-to-column' in that it creates or modifies whitespace if necessary to attain exactly the specified column. (defalias 'move-to-column-force #[(column) " ! !i W j5\f U5hU5!\fj !) )" [natnump column 0 move-to-column col 9 nil indent-tabs-mode delete-char -1 hscroll-point-visible] 3 (#$ . 484)]) #@155 Position point at the beginning of the line. With ARG not nil, move forward ARG - 1 lines first. If scan reaches end of buffer, stop there without error. (defalias 'picture-beginning-of-line #[(&optional arg) "\n!Syy " [arg prefix-numeric-value 0 hscroll-point-visible] 2 (#$ . 873) "P"]) #@173 Position point after last non-blank character on current line. With ARG not nil, move forward ARG - 1 lines first. If scan reaches end of buffer, stop there without error. (defalias 'picture-end-of-line #[(&optional arg) "\n!Syy`x " [arg prefix-numeric-value 0 " " nil hscroll-point-visible] 3 (#$ . 1179) "P"]) #@91 Move cursor right, making whitespace if necessary. With argument, move that many columns. (defalias 'picture-forward-column #[(arg) "i\\ !Wi Vu)" [arg target-column move-to-column-force 0 -1] 2 (#$ . 1513) "p"]) #@90 Move cursor left, making whitespace if necessary. With argument, move that many columns. (defalias 'picture-backward-column #[(arg) " [!" [picture-forward-column arg] 2 (#$ . 1745) "p"]) #@92 Move vertically down, making whitespace if necessary. With argument, move that many lines. (defalias 'picture-move-down #[(arg) "i\n!!)" [col picture-newline arg move-to-column-force] 2 (#$ . 1940) "p"]) #@65 Amount to move vertically after text character in Picture mode. (defconst picture-vertical-step 0 (#$ . 2156)) #@67 Amount to move horizontally after text character in Picture mode. (defconst picture-horizontal-step 1 (#$ . 2273)) #@90 Move vertically up, making whitespace if necessary. With argument, move that many lines. (defalias 'picture-move-up #[(arg) " [!" [picture-move-down arg] 2 (#$ . 2394) "p"]) #@60 Move right after self-inserting character in Picture mode. (defalias 'picture-movement-right #[nil "\"" [picture-set-motion 0 1] 3 (#$ . 2576) nil]) #@59 Move left after self-inserting character in Picture mode. (defalias 'picture-movement-left #[nil "\"" [picture-set-motion 0 -1] 3 (#$ . 2735) nil]) #@57 Move up after self-inserting character in Picture mode. (defalias 'picture-movement-up #[nil "\"" [picture-set-motion -1 0] 3 (#$ . 2893) nil]) #@59 Move down after self-inserting character in Picture mode. (defalias 'picture-movement-down #[nil "\"" [picture-set-motion 1 0] 3 (#$ . 3047) nil]) #@66 Move up and left after self-inserting character in Picture mode. (defalias 'picture-movement-nw #[nil "\"" [picture-set-motion -1] 3 (#$ . 3204) nil]) #@67 Move up and right after self-inserting character in Picture mode. (defalias 'picture-movement-ne #[nil "\"" [picture-set-motion -1 1] 3 (#$ . 3365) nil]) #@68 Move down and left after self-inserting character in Picture mode. (defalias 'picture-movement-sw #[nil "\"" [picture-set-motion 1 -1] 3 (#$ . 3529) nil]) #@69 Move down and right after self-inserting character in Picture mode. (defalias 'picture-movement-se #[nil "\"" [picture-set-motion 1] 3 (#$ . 3694) nil]) #@129 Set VERTICAL and HORIZONTAL increments for movement in Picture mode. The mode line is updated to reflect the current direction. (defalias 'picture-set-motion #[(vert horiz) "\n\nƦƦT_\\\\ɛ@\"\n !" [vert picture-vertical-step horiz picture-horizontal-step format "Picture:%s" 2 3 1 (nw up ne left none right sw down se) mode-name force-mode-line-update message ""] 5 (#$ . 3858)]) #@77 Move in direction of `picture-vertical-step' and `picture-horizontal-step'. (defalias 'picture-move #[nil " ! !" [picture-move-down picture-vertical-step picture-forward-column picture-horizontal-step] 2 (#$ . 4260)]) #@259 Move point in direction of current picture motion in Picture mode. With ARG do it that many times. Useful for delineating rectangles in conjunction with diagonal picture motion. Do \[command-apropos] picture-movement to see commands which control motion. (defalias 'picture-motion #[(arg) " \n_! \f_!" [picture-move-down arg picture-vertical-step picture-forward-column picture-horizontal-step] 3 (#$ . 4489) "p"]) #@268 Move point in direction opposite of current picture motion in Picture mode. With ARG do it that many times. Useful for delineating rectangles in conjunction with diagonal picture motion. Do \[command-apropos] `picture-movement' to see commands which control motion. (defalias 'picture-motion-reverse #[(arg) " [!" [picture-motion arg] 2 (#$ . 4918) "p"]) #@271 Insert this character in place of character previously at the cursor. The cursor then moves in the direction you previously specified with the commands `picture-movement-right', `picture-movement-up', etc. Do \[command-apropos] `picture-movement' to see those commands. (defalias 'picture-self-insert #[(arg) "VSiT!! cu " [arg 0 move-to-column-force delete-char -1 last-command-event picture-move] 2 (#$ . 5283) "p"]) #@51 Clear out ARG columns after point without moving. (defalias 'picture-clear-column #[(arg) "`i\n\\ !`| ]j," [opoint original-col arg target-col move-to-column-force] 3 (#$ . 5728) "p"]) #@60 Clear out ARG columns before point, moving back over them. (defalias 'picture-backward-clear-column #[(arg) " [!" [picture-clear-column arg] 2 (#$ . 5930) "p"]) #@219 Clear out rest of line; if at end of line, advance to next line. Cleared-out line text goes into the kill ring, as do newlines that are advanced over. With argument, clear out (and save in kill ring) that many lines. (defalias 'picture-clear-line #[(arg) "!!V[!!)`y`\"``\"" [arg prefix-numeric-value kill-line newline 0 looking-at "[ ]*$" kill-ring-save 1 kill-region nil] 3 (#$ . 6100) "P"]) #@152 Move to the beginning of the following line. With argument, moves that many lines (up, if negative argument); always moves to the beginning of a line. (defalias 'picture-newline #[(arg) "W\fy)V)m \"uS " [arg 0 nil newline 1 hscroll-point-visible] 3 (#$ . 6537) "p"]) #@93 Insert an empty line after the current line. With positive argument insert that many lines. (defalias 'picture-open-line #[(arg) "\n!) " [nil open-line arg hscroll-point-visible] 2 (#$ . 6842) "p"]) #@51 Insert a duplicate of the current line, below it. (defalias 'picture-duplicate-line #[nil "y`!`{y c*" [0 picture-newline 1 contents -1] 3 (#$ . 7055) nil]) (defalias 'picture-replace-match #[(newtext fixedcase literal) "ĕbi \n#i Z0 \"'* b\nVD`\ni\\!`| \n#\nWX\n[\"+" [nil pos change ocolumn 0 list1 buffer-undo-list replace-match newtext fixedcase literal primitive-undo 1 move-to-column-force insert-char 32] 5]) #@1180 *A character set which controls behavior of commands \[picture-set-tab-stops] and \[picture-tab-search]. It is NOT a regular expression, any regexp special characters will be quoted. It defines a set of "interesting characters" to look for when setting (or searching for) tab stops, initially "!-~" (all printing characters). For example, suppose that you are editing a table which is formatted thus: | foo | bar + baz | 23 * | bubbles | and + etc | 97 * and that `picture-tab-chars' is "|+*". Then invoking \[picture-set-tab-stops] on either of the previous lines would result in the following tab stops : : : : Another example - "A-Za-z0-9" would produce the tab stops : : : : Note that if you want the character `-' to be in the set, it must be included in a range or else appear in a context where it cannot be taken for indicating a range (e.g. "-A-Z" declares the set to be the letters `A' through `Z' and the character `-'). If you want the character `\' in the set it must be preceded by itself: "\\". The command \[picture-tab-search] is defined to move beneath (or to) a character belonging to this set independent of the tab stops list. (defvar picture-tab-chars "!-~" (#$ . -7541)) #@477 Set value of `tab-stop-list' according to context of this line. This controls the behavior of \[picture-tab]. A tab stop is set at every column occupied by an "interesting character" that is preceded by whitespace. Interesting characters are defined by the variable `picture-tab-chars', see its documentation for an example of usage. With ARG, just (re)set `tab-stop-list' to its default value. The tab stops computed are displayed in the minibuffer with `:' at each stop. (defalias 'picture-set-tab-stops #[(&optional arg) "\n!B!Q y`   #5wi B A!\"*  GS 8T\" a @I AS!+" [nil tabs arg default-value tab-stop-list "[ ]+[" regexp-quote picture-tab-chars "]" regexp 0 bol re-search-backward t " " error "No characters in set %s on this line." make-string 32 blurb 58 message] 5 (#$ . 8773) "P"]) #@316 Move to column beneath next interesting char in previous line. With ARG move to column occupied by next interesting character in this line. The character must be preceded by whitespace. "interesting characters" are defined by variable `picture-tab-chars'. If no such character is found, move to beginning of line. (defalias 'picture-tab-search #[(&optional arg) "i y !Pexo! !Q`)#2iS4)?!Cy)" [target arg 0 "^" regexp-quote picture-tab-chars move-to-column re-search-forward "[ ]+[" "]" nil move move-to-column-force] 4 (#$ . 9640) "P"]) #@256 Tab transparently (just move point) to next tab stop. With prefix arg, overwrite the traversed text with spaces. The tab stop list can be changed by \[picture-set-tab-stops] and \[edit-tab-stops]. See also documentation for variable `picture-tab-chars'. (defalias 'picture-tab #[(&optional arg) "` \ni`|\fj*)" [opoint move-to-tab-stop arg nil column indent-tabs-mode] 2 (#$ . 10228) "P"]) #@134 Rectangle killed or copied by \[picture-clear-rectangle] in Picture mode. The contents can be retrieved by \[picture-yank-rectangle] (defconst picture-killed-rectangle nil (#$ . 10637)) #@282 Clear and save rectangle delineated by point and mark. The rectangle is saved for yanking by \[picture-yank-rectangle] and replaced with whitespace. The previously saved rectangle, if any, is lost. With prefix argument, the rectangle is actually killed, shifting remaining text. (defalias 'picture-clear-rectangle #[(start end &optional killp) " \n #" [picture-snarf-rectangle start end killp picture-killed-rectangle] 4 (#$ . 10830) "r\nP"]) #@208 Clear rectangle delineated by point and mark into REGISTER. The rectangle is saved in REGISTER and replaced with whitespace. With prefix argument, the rectangle is actually killed, shifting remaining text. (defalias 'picture-clear-rectangle-to-register #[(start end register &optional killp) " \f #\"" [set-register register picture-snarf-rectangle start end killp] 6 (#$ . 11286) "r\ncRectangle to register: \nP"]) (defalias 'picture-snarf-rectangle #[(start end &optional killp) "i  \" \" \")\n!*" [nil indent-tabs-mode column killp delete-extract-rectangle start end extract-rectangle clear-rectangle move-to-column-force] 4]) #@317 Overlay rectangle saved by \[picture-clear-rectangle] The rectangle is positioned with upper left corner at point, overwriting existing text. With prefix argument, the rectangle is inserted instead, shifting existing text. Leaves mark at one corner of rectangle and point at the other (diagonally opposed) corner. (defalias 'picture-yank-rectangle #[(&optional insertp) ": !\f\"" [picture-killed-rectangle error "No rectangle saved." picture-insert-rectangle insertp] 3 (#$ . 11951) "P"]) #@269 Insert the last killed rectangle at the position clicked on. Also move point to one end of the text thus inserted (normally the end). Prefix arguments are interpreted as with \[yank]. If `mouse-yank-at-point' is non-nil, insert at point regardless of where you click. (defalias 'picture-yank-at-click #[(click arg) "\n!\f!" [mouse-yank-at-point mouse-set-point click picture-yank-rectangle arg] 2 (#$ . 12458) "e\nP"]) #@300 Overlay rectangle saved in REGISTER. The rectangle is positioned with upper left corner at point, overwriting existing text. With prefix argument, the rectangle is inserted instead, shifting existing text. Leaves mark at one corner of rectangle and point at the other (diagonally opposed) corner. (defalias 'picture-yank-rectangle-from-register #[(register &optional insertp) " !: \"\n\")" [get-register register rectangle error "Register %c does not contain a rectangle." picture-insert-rectangle insertp] 4 (#$ . 12892) "cRectangle from register: \nP"]) #@168 Overlay RECTANGLE with upper left corner at point. Optional argument INSERTP, if non-nil causes RECTANGLE to be inserted. Leaves the region surrounding the rectangle. (defalias 'picture-insert-rectangle #[(rectangle &optional insertp) "\n` @G! GS!`\") !)" [nil indent-tabs-mode insertp delete-rectangle picture-forward-column rectangle picture-move-down push-mark insert-rectangle] 4 (#$ . 13472)]) (byte-code "\nB" [nil picture-mode-map current-load-list] 2) (defalias 'picture-substitute #[(oldfun newfun) " \n \f$" [substitute-key-definition oldfun newfun picture-mode-map global-map] 5]) (byte-code "\"D\"\"\"\"\"\"\"\"\"\"\"\"\"\"################@A#BC#DE#FG#ć" [picture-mode-map keymap make-vector 256 nil picture-substitute self-insert-command picture-self-insert forward-char picture-forward-column backward-char picture-backward-column delete-char picture-clear-column backward-delete-char-untabify picture-backward-clear-column delete-backward-char kill-line picture-clear-line open-line picture-open-line newline picture-newline newline-and-indent picture-duplicate-line next-line picture-move-down previous-line picture-move-up beginning-of-line picture-beginning-of-line end-of-line picture-end-of-line define-key "" " " picture-toggle-tab-state " " picture-tab picture-tab-search " " picture-set-tab-stops " " picture-clear-rectangle "" picture-clear-rectangle-to-register "" picture-yank-rectangle "" picture-yank-rectangle-from-register "" picture-mode-exit "" picture-motion "" picture-motion-reverse "<" picture-movement-left ">" picture-movement-right "^" picture-movement-up "." picture-movement-down "`" picture-movement-nw "'" picture-movement-ne "/" picture-movement-sw "\\" picture-movement-se] 4) #@115 If non-nil, its value is called on entry to Picture mode. Picture mode is invoked by the command \[picture-mode]. (defvar picture-mode-hook nil (#$ . 15424)) (byte-code " B B B B" [picture-mode-old-local-map current-load-list picture-mode-old-mode-name picture-mode-old-major-mode picture-mode-old-truncate-lines] 2) #@3069 Switch to Picture mode, in which a quarter-plane screen model is used. Printing characters replace instead of inserting themselves with motion afterwards settable by these commands: C-c < Move left after insertion. C-c > Move right after insertion. C-c ^ Move up after insertion. C-c . Move down after insertion. C-c ` Move northwest (nw) after insertion. C-c ' Move northeast (ne) after insertion. C-c / Move southwest (sw) after insertion. C-c \ Move southeast (se) after insertion. The current direction is displayed in the mode line. The initial direction is right. Whitespace is inserted and tabs are changed to spaces when required by movement. You can move around in the buffer with these commands: \[picture-move-down] Move vertically to SAME column in previous line. \[picture-move-up] Move vertically to SAME column in next line. \[picture-end-of-line] Move to column following last non-whitespace character. \[picture-forward-column] Move right inserting spaces if required. \[picture-backward-column] Move left changing tabs to spaces if required. C-c C-f Move in direction of current picture motion. C-c C-b Move in opposite direction of current picture motion. Return Move to beginning of next line. You can edit tabular text with these commands: M-Tab Move to column beneath (or at) next interesting character. `Indents' relative to a previous line. Tab Move to next stop in tab stop list. C-c Tab Set tab stops according to context of this line. With ARG resets tab stops to default (global) value. See also documentation of variable picture-tab-chars which defines "interesting character". You can manually change the tab stop list with command \[edit-tab-stops]. You can manipulate text with these commands: C-d Clear (replace) ARG columns after point without moving. C-c C-d Delete char at point - the command normally assigned to C-d. \[picture-backward-clear-column] Clear (replace) ARG columns before point, moving back over them. \[picture-clear-line] Clear ARG lines, advancing over them. The cleared text is saved in the kill ring. \[picture-open-line] Open blank line(s) beneath current line. You can manipulate rectangles with these commands: C-c C-k Clear (or kill) a rectangle and save it. C-c C-w Like C-c C-k except rectangle is saved in named register. C-c C-y Overlay (or insert) currently saved rectangle at point. C-c C-x Like C-c C-y except rectangle is taken from named register. \[copy-rectangle-to-register] Copies a rectangle to a register. \[advertised-undo] Can undo effects of rectangle overlay commands commands if invoked soon enough. You can return to the previous mode with: C-c C-c Which also strips trailing whitespace from every line. Stripping is suppressed by supplying an argument. Entry to this mode calls the value of picture-mode-hook if non-nil. Note that Picture mode commands will work outside of Picture mode, but they are not defaultly assigned to keys. (defalias 'picture-mode #[nil "=\n!! !!\n ! !\f!!!!!!!\"\"! \"" [major-mode picture-mode error "You are already editing a picture." make-local-variable picture-mode-old-local-map current-local-map use-local-map picture-mode-map picture-mode-old-mode-name mode-name picture-mode-old-major-mode picture-killed-rectangle nil tab-stop-list default-value picture-tab-chars picture-vertical-step picture-horizontal-step picture-mode-old-truncate-lines truncate-lines t picture-set-motion 0 1 run-hooks edit-picture-hook picture-mode-hook message substitute-command-keys "Type \\[picture-mode-exit] in this buffer to return it to %s mode."] 3 (#$ . 15759) nil]) (defalias (quote edit-picture) (quote picture-mode)) #@172 Undo picture-mode and return to previous major mode. With no argument strips whitespace from end of every line in Picture buffer otherwise just return to previous mode. (defalias 'picture-mode-exit #[(&optional nostrip) "=\n!\f  !\n!  " [major-mode picture-mode error "You aren't editing a Picture." nostrip picture-clean picture-mode-old-mode-name mode-name use-local-map picture-mode-old-local-map picture-mode-old-major-mode kill-local-variable tab-stop-list picture-mode-old-truncate-lines truncate-lines force-mode-line-update] 2 (#$ . 19618) "P"]) #@40 Eliminate whitespace at ends of lines. (defalias 'picture-clean #[nil "eb#Ĕ`|)" [re-search-forward "[ ][ ]*$" nil t 0] 4 (#$ . 20209)]) (provide (quote picture))