;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May 3 21:52:43 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/picture.el ;;; emacs version 19.22.92.2. ;;; 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")) (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 "\ 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 'picture-beginning-of-line #[(&optional arg) "\n!Syy " [arg prefix-numeric-value 0 hscroll-point-visible] 2 "\ 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." "P"]) (defalias 'picture-end-of-line #[(&optional arg) "\n!Syy`x " [arg prefix-numeric-value 0 " " nil hscroll-point-visible] 3 "\ 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." "P"]) (defalias 'picture-forward-column #[(arg) "i\\ !Wi Vu)" [arg target-column move-to-column-force 0 -1] 2 "\ Move cursor right, making whitespace if necessary. With argument, move that many columns." "p"]) (defalias 'picture-backward-column #[(arg) " [!" [picture-forward-column arg] 2 "\ Move cursor left, making whitespace if necessary. With argument, move that many columns." "p"]) (defalias 'picture-move-down #[(arg) "i\n!!)" [col picture-newline arg move-to-column-force] 2 "\ Move vertically down, making whitespace if necessary. With argument, move that many lines." "p"]) (defconst picture-vertical-step 0 "\ Amount to move vertically after text character in Picture mode.") (defconst picture-horizontal-step 1 "\ Amount to move horizontally after text character in Picture mode.") (defalias 'picture-move-up #[(arg) " [!" [picture-move-down arg] 2 "\ Move vertically up, making whitespace if necessary. With argument, move that many lines." "p"]) (defalias 'picture-movement-right #[nil "\"" [picture-set-motion 0 1] 3 "\ Move right after self-inserting character in Picture mode." nil]) (defalias 'picture-movement-left #[nil "\"" [picture-set-motion 0 -1] 3 "\ Move left after self-inserting character in Picture mode." nil]) (defalias 'picture-movement-up #[nil "\"" [picture-set-motion -1 0] 3 "\ Move up after self-inserting character in Picture mode." nil]) (defalias 'picture-movement-down #[nil "\"" [picture-set-motion 1 0] 3 "\ Move down after self-inserting character in Picture mode." nil]) (defalias 'picture-movement-nw #[nil "\"" [picture-set-motion -1] 3 "\ Move up and left after self-inserting character in Picture mode." nil]) (defalias 'picture-movement-ne #[nil "\"" [picture-set-motion -1 1] 3 "\ Move up and right after self-inserting character in Picture mode." nil]) (defalias 'picture-movement-sw #[nil "\"" [picture-set-motion 1 -1] 3 "\ Move down and left after self-inserting character in Picture mode." nil]) (defalias 'picture-movement-se #[nil "\"" [picture-set-motion 1] 3 "\ Move down and right after self-inserting character in Picture mode." nil]) (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 set-buffer-modified-p buffer-modified-p message ""] 5 "\ Set VERTICAL and HORIZONTAL increments for movement in Picture mode. The mode line is updated to reflect the current direction."]) (defalias 'picture-move #[nil " ! !" [picture-move-down picture-vertical-step picture-forward-column picture-horizontal-step] 2 "\ Move in direction of `picture-vertical-step' and `picture-horizontal-step'."]) (defalias 'picture-motion #[(arg) " \n_! \f_!" [picture-move-down arg picture-vertical-step picture-forward-column picture-horizontal-step] 3 "\ 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." "p"]) (defalias 'picture-motion-reverse #[(arg) " [!" [picture-motion arg] 2 "\ 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." "p"]) (defalias 'picture-self-insert #[(arg) "VSiT!! cu " [arg 0 move-to-column-force delete-char -1 last-input-char picture-move] 2 "\ 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." "p"]) (defalias 'picture-clear-column #[(arg) "`i\n\\ !`| ]j," [opoint original-col arg target-col move-to-column-force] 3 "\ Clear out ARG columns after point without moving." "p"]) (defalias 'picture-backward-clear-column #[(arg) " [!" [picture-clear-column arg] 2 "\ Clear out ARG columns before point, moving back over them." "p"]) (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 "\ 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." "P"]) (defalias 'picture-newline #[(arg) "W\fy)V)m \"uS " [arg 0 nil newline 1 hscroll-point-visible] 3 "\ 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." "p"]) (defalias 'picture-open-line #[(arg) "\n!) " [nil open-line arg hscroll-point-visible] 2 "\ Insert an empty line after the current line. With positive argument insert that many lines." "p"]) (defalias 'picture-duplicate-line #[nil "y`!`{y c*" [0 picture-newline 1 contents -1] 3 "\ Insert a duplicate of the current line, below it." nil]) (defalias (quote 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]) (defvar picture-tab-chars "!-~" "\ *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.") (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 "\ 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." "P"]) (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 "\ 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." "P"]) (defalias 'picture-tab #[(&optional arg) "` \ni`|\fj*)" [opoint move-to-tab-stop arg nil column indent-tabs-mode] 2 "\ 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'." "P"]) (defconst picture-killed-rectangle nil "\ Rectangle killed or copied by \\[picture-clear-rectangle] in Picture mode. The contents can be retrieved by \\[picture-yank-rectangle]") (defalias 'picture-clear-rectangle #[(start end &optional killp) " \n #" [picture-snarf-rectangle start end killp picture-killed-rectangle] 4 "\ 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." "r\nP"]) (defalias 'picture-clear-rectangle-to-register #[(start end register &optional killp) " \f #\"" [set-register register picture-snarf-rectangle start end killp] 6 "\ 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." "r\ncRectangle to register: \nP"]) (defalias (quote 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]) (defalias 'picture-yank-rectangle #[(&optional insertp) ": !\f\"" [picture-killed-rectangle error "No rectangle saved." picture-insert-rectangle insertp] 3 "\ 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." "P"]) (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 "\ 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." "cRectangle from register: \nP"]) (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 "\ 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."]) (byte-code "\"  W+ \"#T\"\"\"\"\"\"\"\"\"\"\"\"\" # # # # # # # # # # # # # # @A# BC# DE# FG# HI# JK#)" [nil picture-mode-map defalias picture-substitute #[(oldfun newfun) " \n \f$" [substitute-key-definition oldfun newfun picture-mode-map global-map] 5] 32 i make-keymap 127 define-key make-string 1 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-andindent 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 "" " " 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] 6) (defvar picture-mode-hook nil "\ If non-nil, its value is called on entry to Picture mode. Picture mode is invoked by the command \\[picture-mode].") (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 "\ 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." nil]) (defalias (quote edit-picture) (quote picture-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 set-buffer-modified-p buffer-modified-p] 2 "\ 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." "P"]) (defalias 'picture-clean #[nil "eb#Ĕ`|)" [re-search-forward "[ ][ ]*$" nil t 0] 4 "\ Eliminate whitespace at ends of lines."]) (provide (quote picture))