(defun move-to-column-force (column) "\ 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." (byte-code "Ã!ˆi Wƒ j‚/ Ä \"… hÅUƒ. ÆÇÈ!ˆ jˆÃ!)‚/ Æ)‡" [column col indent-tabs-mode move-to-column /= 9 nil delete-char -1] 5)) (defun Picture-end-of-line (&optional arg) "\ 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." (interactive "P") (byte-code "Áˆƒ ÂÃ!S!‚ ÁˆÄ ˆÅÆ`Ç ˆ\"‡" [arg nil forward-line prefix-numeric-value beginning-of-line skip-chars-backward " " end-of-line] 8)) (defun Picture-forward-column (arg) "\ Move cursor right, making whitespace if necessary. With argument, move that many columns." (interactive "p") (byte-code "ÁˆÂi\\!‡" [arg nil move-to-column-force] 3)) (defun Picture-backward-column (arg) "\ Move cursor left, making whitespace if necessary. With argument, move that many columns." (interactive "p") (byte-code "ÁˆÂiZ!‡" [arg nil move-to-column-force] 3)) (defun Picture-move-down (arg) "\ Move vertically down, making whitespace if necessary. With argument, move that many lines." (interactive "p") (byte-code "ˆià !ˆÄ!)‡" [col arg nil Picture-newline move-to-column-force] 3)) (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.") (defun Picture-move-up (arg) "\ Move vertically up, making whitespace if necessary. With argument, move that many lines." (interactive "p") (byte-code "ÁˆÂ[!‡" [arg nil Picture-move-down] 2)) (defun picture-movement-right nil "\ Move right after self-inserting character in Picture mode." (interactive) (byte-code "ÀˆÁÂÃ\"‡" [nil Picture-set-motion 0 1] 3)) (defun picture-movement-left nil "\ Move left after self-inserting character in Picture mode." (interactive) (byte-code "ÀˆÁÂÃ\"‡" [nil Picture-set-motion 0 -1] 3)) (defun picture-movement-up nil "\ Move up after self-inserting character in Picture mode." (interactive) (byte-code "ÀˆÁÂÃ\"‡" [nil Picture-set-motion -1 0] 3)) (defun picture-movement-down nil "\ Move down after self-inserting character in Picture mode." (interactive) (byte-code "ÀˆÁÂÃ\"‡" [nil Picture-set-motion 1 0] 3)) (defun picture-movement-nw nil "\ Move up and left after self-inserting character in Picture mode." (interactive) (byte-code "ÀˆÁÂÂ\"‡" [nil Picture-set-motion -1] 3)) (defun picture-movement-ne nil "\ Move up and right after self-inserting character in Picture mode." (interactive) (byte-code "ÀˆÁÂÃ\"‡" [nil Picture-set-motion -1 1] 3)) (defun picture-movement-sw nil "\ Move down and left after self-inserting character in Picture mode." (interactive) (byte-code "ÀˆÁÂÃ\"‡" [nil Picture-set-motion 1 -1] 3)) (defun picture-movement-se nil "\ Move down and right after self-inserting character in Picture mode." (interactive) (byte-code "ÀˆÁÂÂ\"‡" [nil Picture-set-motion 1] 3)) (defun Picture-set-motion (vert horiz) "\ Set VERTICAL and HORIZONTAL increments for movement in Picture mode. The mode line is updated to reflect the current direction." (byte-code " ‰ˆÅÆÇÈÉÊË\"ÌÍÊ Ë\"T\"#Î\"@\"‰ˆÏÐ !ˆÑÒ!‡" [picture-vertical-step vert picture-horizontal-step horiz mode-name format "Picture:%s" nthcdr + 1 % 2 * 3 (nw up ne left none right sw down se) set-buffer-modified-p buffer-modified-p message ""] 12)) (defun Picture-move nil "\ Move in direction of picture-vertical-step and picture-horizontal-step." (byte-code "Â!ˆÃ !‡" [picture-vertical-step picture-horizontal-step Picture-move-down Picture-forward-column] 3)) (defun Picture-motion (arg) "\ 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." (interactive "p") (byte-code "ÈÄÅ \"!ˆÆÅ \"!‡" [arg picture-vertical-step picture-horizontal-step nil Picture-move-down * Picture-forward-column] 6)) (defun Picture-motion-reverse (arg) "\ 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." (interactive "p") (byte-code "ÁˆÂ[!‡" [arg nil Picture-motion] 2)) (defun Picture-self-insert (arg) "\ 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." (interactive "p") (byte-code "ˆÃV…# S‰ˆÄiT!ˆÅÆ!ˆ cˆÇÆ!ˆÈ ˆ‚ ‡" [arg last-input-char nil 0 move-to-column-force delete-char -1 forward-char Picture-move] 6)) (defun Picture-clear-column (arg) "\ Clear out ARG columns after point without moving." (interactive "p") (byte-code "Ĉ`i \\Å !ˆÆ`\"ˆŠ ]j)+‡" [opoint original-col target-col arg nil move-to-column-force delete-region] 4)) (defun Picture-backward-clear-column (arg) "\ Clear out ARG columns before point, moving back over them." (interactive "p") (byte-code "ÁˆÂ[!‡" [arg nil Picture-clear-column] 2)) (defun Picture-clear-line (arg) "\ 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." (interactive "P") (byte-code "Áˆƒ1 Â!‰ˆÃ``ÄVƒ ‚ ÅZÆk\"ˆÇÄVƒ+ ‚- [!‚I ÈÉ!ƒB Ê`ËÅ!ˆ`\"‚I Ã`Ì ˆ`\"‡" [arg nil prefix-numeric-value kill-region 0 1 10 newline looking-at "[ ]*$" kill-ring-save forward-line end-of-line] 10)) (defun Picture-newline (arg) "\ 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." (interactive "p") (byte-code "ÁˆÂWƒ Ã!‚, ÂV…, Ä ˆmƒ Å ‚# ÆÇ!ˆS‰ˆ‚ ‡" [arg nil 0 forward-line end-of-line newline forward-char 1] 7)) (defun Picture-open-line (arg) "\ Insert an empty line after the current line. With positive argument insert that many lines." (interactive "p") (byte-code "ÁˆŠÂ ˆÃ!)‡" [arg nil end-of-line open-line] 3)) (defun Picture-duplicate-line nil "\ Insert a duplicate of the current line, below it." (interactive) (byte-code "ÁˆŠÂà ˆ`ÄÅ!ˆ`\"ÆÇ!ˆc))‡" [contents nil buffer-substring beginning-of-line Picture-newline 1 forward-line -1] 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.") (defun Picture-set-tab-stops (&optional arg) "\ 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." (interactive "P") (byte-code "ȈŠÈ ƒ ÉÆ!‰‚G ÊË!ÌQÍ ˆ`Î ˆÏ #…5 ÐÑ!ˆiB‰ˆ‚ ˆ?ƒD ÒÓË!\"‚E È))ˆ‰ˆÔGS8TÕ\"…k @ÖIˆA‰ˆ‚X ˆ×!)))‡" [tabs arg regexp picture-tab-chars bol t tab-stop-list blurb nil default-value "[ ]+[" regexp-quote "]" beginning-of-line end-of-line re-search-backward skip-chars-forward " " error "No characters in set %s on this line." make-string 32 58 message] 13)) (defun Picture-tab-search (&optional arg) "\ 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." (interactive "P") (byte-code "ÈiŠ ?… Ä ˆÅÆÇ !Pe\"ˆo?ƒ! È!‚\"