;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May 2 20:13:04 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/array.el ;;; emacs version 19.28.90.69. ;;; 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/array.el' was compiled for Emacs 19")) #@86 Returns t if the cursor is in a valid array cell. Its ok to be on a row number line. (defalias 'array-cursor-in-array-range #[nil "  \fY+ _Y+ TU+\nU?+ \n _Y)?" [max-column columns-per-line columns-last-line buffer-column line-length buffer-line lines-per-row max-row 0 field-width] 3 (#$ . 479)]) #@67 Return the array row of the field in which the cursor is located. (defalias 'array-current-row #[nil " \n\n \"T" [array-cursor-in-array-range floor buffer-line lines-per-row] 3 (#$ . 804)]) #@70 Return the array column of the field in which the cursor is located. (defalias 'array-current-column #[nil " * \n U?* \n S!\n _\"T\\" [array-cursor-in-array-range rows-numbered buffer-line lines-per-row 0 columns-per-line floor buffer-column field-width] 4 (#$ . 1005)]) #@109 Set `array-row' and `array-column' to their current values or to the optional arguments A-ROW and A-COLUMN. (defalias 'array-update-array-position #[(&optional a-row a-column) "  " [a-row array-current-row array-row a-column array-current-column array-column] 2 (#$ . 1307)]) #@60 Set buffer-line and buffer-column to their current values. (defalias 'array-update-buffer-position #[nil " i" [current-line buffer-line buffer-column] 2 (#$ . 1603)]) #@63 Display the row and column in which the cursor is positioned. (defalias 'array-what-position #[nil " i ! !#!*" [current-line buffer-column buffer-line message format "Array row: %s Array column: %s" prin1-to-string array-current-row array-current-column] 6 (#$ . 1781) nil]) #@69 Display the current state of the local variables in the minibuffer. (defalias 'array-display-local-variables #[nil "p!\f! \"! !\"! !\"!!\"!!\"!!\"!!\"!!\"!)" [buffer-name buf "*Local Variables*" buffer-disable-undo standard-output terpri princ format " Buffer: %s\n\n" " max-row: %s\n" prin1-to-string max-row " max-column: %s\n" max-column " columns-per-line: %s\n" columns-per-line " field-width: %s\n" field-width " rows-numbered: %s\n" rows-numbered " lines-per-row: %s\n" lines-per-row " line-length: %s\n" line-length] 6 (#$ . 2074) nil]) #@118 Return the column of the beginning of the current field. Optional argument GO-THERE, if non-nil, means go there too. (defalias 'array-beginning-of-field #[(&optional go-there) " Z \n!\n)" [buffer-column field-width goal-column go-there move-to-column-untabify] 3 (#$ . 2744)]) #@114 Return the column of the end of the current array field. If optional argument GO-THERE is non-nil, go there too. (defalias 'array-end-of-field #[(&optional go-there) " Z \\ \n!\n)" [buffer-column field-width goal-column go-there move-to-column-untabify] 3 (#$ . 3040)]) #@130 Move to array row A-ROW and array column A-COLUMN. Leave point at the beginning of the field and return the new buffer column. (defalias 'array-move-to-cell #[(a-row a-column) " S_\n\f S\"\\\\S_ \neb\ny !*" [lines-per-row a-row rows-numbered 1 0 floor a-column columns-per-line field-width goal-column goal-line move-to-column-untabify] 5 (#$ . 3329)]) #@134 Move to array row A-ROW preserving the current array column. Leave point at the beginning of the field and return the new array row. (defalias 'array-move-to-row #[(a-row) " S_\n\\ \fZ\nZy ! *" [lines-per-row a-row buffer-line buffer-column field-width goal-column goal-line move-to-column-untabify] 5 (#$ . 3718)]) #@140 Move to array column A-COLUMN preserving the current array row. Leave point at the beginning of the field and return the new array column. (defalias 'array-move-to-column #[(a-column) " Z\n ÂS\"\\\\S_ \nZy !*" [buffer-line lines-per-row rows-numbered 1 0 floor a-column columns-per-line field-width goal-column goal-line move-to-column-untabify] 6 (#$ . 4054)]) #@184 Move one array row in direction SIGN (1 or -1). Leave point at the beginning of the field and return the new array row. If requested to move beyond the array bounds, signal an error. (defalias 'array-move-one-row #[(sign) " \n!\fU U !B\fU3U3!B\f_y !\f\\*" [array-beginning-of-field array-current-row error "Cursor is not in a valid array cell." array-row goal-column max-row sign 1 "End of array." -1 "Beginning of array." lines-per-row move-to-column-untabify] 3 (#$ . 4455)]) #@190 Move one array column in direction SIGN (1 or -1). Leave point at the beginning of the field and return the new array column. If requested to move beyond the array bounds, signal an error. (defalias 'array-move-one-column #[(sign) " !\fU U!m U- U-!m UK \nUKy\f\nS_!j U` \nU`yj \f _\\! \\)" [array-current-column error "Cursor is not in a valid array cell." array-column max-column sign 1 "End of array." -1 "Beginning of array." columns-per-line move-to-column-untabify field-width 0 array-beginning-of-field] 5 (#$ . 4983)]) #@135 Move the cursor to the first non-whitespace character in the field and, if necessary, scroll horizontally to keep the cursor in view. (defalias 'array-normalize-cursor #[nil "i!`)Sw )" [buffer-column " " array-end-of-field t array-maybe-scroll-horizontally] 3 (#$ . 5579)]) #@63 If necessary, scroll horizontally to keep the cursor in view. (defalias 'array-maybe-scroll-horizontally #[nil " \f Y\f \n\\Xł5\f \n\\V,\f Z\nǥZ!5 \fZ\nǥ\\!*" [window-hscroll window-width w-width w-hscroll buffer-column nil scroll-left 2 scroll-right] 4 (#$ . 5869)]) #@115 Move down one array row, staying in the current array column. If optional ARG is given, move down ARG array rows. (defalias 'array-next-row #[(&optional arg) " i\f!U\f!% !\f\\\f\"!* " [current-line buffer-column buffer-line abs arg 1 array-move-one-row array-move-to-row limit-index array-current-row error "Cursor is not in an array cell." max-row array-normalize-cursor] 4 (#$ . 6166) "p"]) #@111 Move up one array row, staying in the current array column. If optional ARG is given, move up ARG array rows. (defalias 'array-previous-row #[(&optional arg) " [!" [array-next-row arg] 2 (#$ . 6590) "p"]) #@189 Move forward one field, staying in the current array row. If optional ARG is given, move forward ARG array columns. If necessary, keep the cursor in the window by scrolling right or left. (defalias 'array-forward-column #[(&optional arg) " i\f!U\f!% !\f\\\f\"!* " [current-line buffer-column buffer-line abs arg 1 array-move-one-column array-move-to-column limit-index array-current-column error "Cursor is not in an array cell." max-column array-normalize-cursor] 4 (#$ . 6804) "p"]) #@191 Move backward one field, staying in the current array row. If optional ARG is given, move backward ARG array columns. If necessary, keep the cursor in the window by scrolling right or left. (defalias 'array-backward-column #[(&optional arg) " [!" [array-forward-column arg] 2 (#$ . 7320) "p"]) #@50 Go to array row A-ROW and array column A-COLUMN. (defalias 'array-goto-cell #[(a-row a-column) "\n \"\f \"\" " [array-move-to-cell limit-index a-row max-row a-column max-column array-normalize-cursor] 5 (#$ . 7622) "nArray row: \nnArray column: "]) #@57 Return the field string at the current cursor location. (defalias 'array-field-string #[nil "!`)!`){" [array-beginning-of-field t array-end-of-field] 3 (#$ . 7883)]) #@207 Copy the current field into one array row in direction SIGN (1 or -1). Leave point at the beginning of the field and return the new array row. If requested to move beyond the array bounds, signal an error. (defalias 'array-copy-once-vertically #[(sign) " !`!`)|c)!\n)" [array-move-one-row sign a-row t inhibit-quit array-end-of-field copy-string move-to-column buffer-column] 3 (#$ . 8065)]) #@213 Copy the current field into one array column in direction SIGN (1 or -1). Leave point at the beginning of the field and return the new array column. If requested to move beyond the array bounds, signal an error. (defalias 'array-copy-once-horizontally #[(sign) " ! `!`)|c) !\n)" [array-move-one-column sign a-column array-update-buffer-position t inhibit-quit array-end-of-field copy-string move-to-column buffer-column] 3 (#$ . 8481)]) #@121 Copy the current field vertically into every cell up to and including A-ROW. Leave point at the beginning of the field. (defalias 'array-copy-to-row #[(a-row) " Z\n!U?\n\f\fV@! \n`!`)|\fc)!\fS+" [a-row array-row num abs count 0 sign array-move-one-row array-update-buffer-position t inhibit-quit array-end-of-field copy-string move-to-column buffer-column] 4 (#$ . 8943)]) #@127 Copy the current field horizontally into every cell up to and including A-COLUMN. Leave point at the beginning of the field. (defalias 'array-copy-to-column #[(a-column) " Z\n!U?\n\f\fV@! \n`!`)|\fc)!\fS+" [a-column array-column num abs count 0 sign array-move-one-column array-update-buffer-position t inhibit-quit array-end-of-field copy-string move-to-column buffer-column] 4 (#$ . 9363)]) #@101 Copy the current field into the cell at A-ROW, A-COLUMN. Leave point at the beginning of the field. (defalias 'array-copy-to-cell #[(a-row a-column) " \n\" `!`)|c!" [array-move-to-cell a-row a-column array-update-buffer-position array-end-of-field t copy-string move-to-column buffer-column] 3 (#$ . 9804)]) #@104 Copy the current field one array row down. If optional ARG is given, copy down through ARG array rows. (defalias 'array-copy-down #[(&optional arg) " i ! \n!U$\n!0\n\\\"!, " [current-line buffer-line buffer-column array-current-row error "Cursor is not in a valid array cell." array-row array-field-string copy-string abs arg 1 array-copy-once-vertically array-copy-to-row limit-index max-row array-normalize-cursor] 4 (#$ . 10135) "p"]) #@100 Copy the current field one array row up. If optional ARG is given, copy up through ARG array rows. (defalias 'array-copy-up #[(&optional arg) " [!" [array-copy-down arg] 2 (#$ . 10614) "p"]) #@126 Copy the current field one array column to the right. If optional ARG is given, copy through ARG array columns to the right. (defalias 'array-copy-forward #[(&optional arg) " i ! \n!U$\n!0\n\\\"!, " [current-line buffer-line buffer-column array-current-column error "Cursor is not in a valid array cell." array-column array-field-string copy-string abs arg 1 array-copy-once-horizontally array-copy-to-column limit-index max-column array-normalize-cursor] 4 (#$ . 10814) "p"]) #@124 Copy the current field one array column to the left. If optional ARG is given, copy through ARG array columns to the left. (defalias 'array-copy-backward #[(&optional arg) " [!" [array-copy-forward arg] 2 (#$ . 11332) "p"]) #@134 Copy the entire current column in to the column to the right. If optional ARG is given, copy through ARG array columns to the right. (defalias 'array-copy-column-forward #[(&optional arg) " \n!! WOT\n\" \f!U@!K\n\\\"!))!! " [array-update-buffer-position array-update-array-position array-column error "Cursor is not in a valid array cell." message "Working..." 0 this-row max-row array-move-to-cell array-field-string copy-string abs arg 1 array-copy-once-horizontally array-copy-to-column limit-index max-column "Working...done" array-move-to-row array-row array-normalize-cursor] 4 (#$ . 11565) "p"]) #@120 Copy the entire current column one column to the left. If optional ARG is given, copy through ARG columns to the left. (defalias 'array-copy-column-backward #[(&optional arg) " [!" [array-copy-column-forward arg] 2 (#$ . 12241) "p"]) #@97 Copy the entire current row one row down. If optional ARG is given, copy through ARG rows down. (defalias 'array-copy-row-down #[(&optional arg) " \n!\nU\"U\"!\n U7U7!\n\"`)\n\f\"y`){ \n\\ \"Z!U?tV\\\"`\f\"y`)| c)Sx\". " [array-update-buffer-position array-update-array-position array-row error "Cursor is not in a valid array cell." 1 arg -1 "Beginning of array." max-row "End of array." array-move-to-cell max-column copy-string this-row limit-index goal-row num abs count 0 sign t inhibit-quit array-column array-normalize-cursor] 5 (#$ . 12483) "p"]) #@107 Copy the entire current array row into the row above. If optional ARG is given, copy through ARG rows up. (defalias 'array-copy-row-up #[(&optional arg) " [!" [array-copy-row-down arg] 2 (#$ . 13177) "p"]) #@64 Copy the field at mark into every cell between mark and point. (defalias 'array-fill-rectangle #[nil " ! ! \"!) 2!) \n!\n^\n] ^ ] \" )\"\"  !)\"` \"i!`){UT\"` \"i!`)|c).!\n \"," [array-update-buffer-position array-current-row error "Cursor is not in a valid array cell." array-current-column exchange-point-and-mark "Mark is not in a valid array cell." m-column m-row p-column p-row message "Working..." right-column left-column bottom-row top-row array-move-to-cell array-field-string copy-string array-copy-to-cell array-update-array-position array-copy-to-column buffer-column array-end-of-field t this-row inhibit-quit "Working...done" array-goto-cell] 5 (#$ . 13391) nil]) #@34 Create the template of an array. (defalias 'array-make-template #[nil " /!GU)\n\"!\n*eb!XN\"cXzcUqUq TR)T :)!͉\"" [t nil len check read-input "Initial field value: " init-field field-width y-or-n-p format "Change field width to %d? " message "Working..." 1 this-row max-row rows-numbered "%d:\n" this-column max-column columns-per-line 0 newline "Working...done" array-goto-cell] 5 (#$ . 14241) nil]) #@222 Reconfigure the state of `rows-numbered' and `columns-per-line'. NEW-COLUMNS-PER-LINE is the desired value of `columns-per-line' and NEW-ROWS-NUMBERED (a character, either ?y or ?n) is the desired value of rows-numbered. (defalias 'array-reconfigure-rows #[(new-columns-per-line new-rows-numbered) " $\nY\n\fXʼn\f\"!!)\n=2\nD\n=?\nD!\n! p!!\f !\"#$ ed#qeb$X2\n\n\n!$\"!\nUÂZy)S\"S\n\",-././W.T#_!!.T.y,-W%!\n_! ,T,\fy,$T$2q !\n\n!\n_\"S\n\"\n]^\\7h8n\")!.\n!" [t check new-columns-per-line 1 max-column nil string-to-int read-input format "Columns per line (1 - %d): " new-rows-numbered 121 110 y-or-n-p "Rows numbered? " message "Working..." array-update-buffer-position buffer-name main-buffer make-temp-name "Array" temp-buffer max-row temp-max-row temp-max-column rows-numbered old-rows-numbered columns-per-line old-columns-per-line lines-per-row old-lines-per-row field-width old-field-width line-length old-line-length this-row array-update-array-position copy-to-buffer kill-line insert-string "%d:\n" 0 floor newlines-added newlines-to-be-added newlines-removed newlines-to-be-removed move-to-column-untabify newline inhibit-quit erase-buffer insert-buffer 2 array-goto-cell array-row array-column kill-buffer "Working...done"] 6 (#$ . 14757) "nColumns per line: \ncRows numbered? (y or n) "]) #@66 Expand the rows so each fits on one line and remove row numbers. (defalias 'array-expand-rows #[nil " \"" [array-reconfigure-rows max-column 110] 3 (#$ . 16319) nil]) (defalias 'limit-index #[(index limit) "W\nV\n" [index 1 limit] 2]) #@65 Returns the logical exclusive or of predicates PRED1 and PRED2. (defalias 'xor #[(pred1 pred2) "  ?" [pred1 pred2] 1 (#$ . 16577)]) #@64 Return the current buffer line at point. The first line is 0. (defalias 'current-line #[nil "ye`\")" [0 count-lines] 3 (#$ . 16727)]) #@78 Move to COLUMN on the current line, untabifying if necessary. Return COLUMN. (defalias 'move-to-column-untabify #[(column) "!U\f\n! !" [column move-to-column respect-tabs error "There is a TAB character in the way." untabify-backward] 3 (#$ . 16873)]) #@29 Untabify the preceding tab. (defalias 'untabify-backward #[nil "`!`\"*" [start backward-char 1 untabify] 3 (#$ . 17151)]) #@28 Keymap used in array mode. (defvar array-mode-map nil (#$ . 17287)) (byte-code "y ####################" [array-mode-map make-keymap define-key "d" array-display-local-variables "m" array-make-template "e" array-expand-rows "r" array-reconfigure-rows "=" array-what-position "g" array-goto-cell "f" array-fill-rectangle "" array-next-row "" array-previous-row "" array-forward-column "" array-backward-column "" array-copy-down "" array-copy-up "" array-copy-forward "" array-copy-backward "" array-copy-row-down "" array-copy-row-up "" array-copy-column-forward "" array-copy-column-backward put array-mode mode-class special] 4) #@2974 Major mode for editing arrays. Array mode is a specialized mode for editing arrays. An array is considered to be a two-dimensional set of strings. The strings are NOT recognized as integers or real numbers. The array MUST reside at the top of the buffer. TABs are not respected, and may be converted into spaces at any time. Setting the variable 'respect-tabs to non-nil will prevent TAB conversion, but will cause many functions to give errors if they encounter one. Upon entering array mode, you will be prompted for the values of several variables. Others will be calculated based on the values you supply. These variables are all local the the buffer. Other buffer in array mode may have different values assigned to the variables. The variables are: Variables you assign: max-row: The number of rows in the array. max-column: The number of columns in the array. columns-per-line: The number of columns in the array per line of buffer. field-width: The width of each field, in characters. rows-numbered: A logical variable describing whether to ignore row numbers in the buffer. Variables which are calculated: line-length: The number of characters in a buffer line. lines-per-row: The number of buffer lines used to display each row. The following commands are available (an asterisk indicates it may take a numeric prefix argument): * \\[array-forward-column] Move forward one column. * \[array-backward-column] Move backward one column. * \[array-next-row] Move down one row. * \[array-previous-row] Move up one row. * \[array-copy-forward] Copy the current field into the column to the right. * \[array-copy-backward] Copy the current field into the column to the left. * \[array-copy-down] Copy the current field into the row below. * \[array-copy-up] Copy the current field into the row above. * \[array-copy-column-forward] Copy the current column into the column to the right. * \[array-copy-column-backward] Copy the current column into the column to the left. * \[array-copy-row-down] Copy the current row into the row below. * \[array-copy-row-up] Copy the current row into the row above. \[array-fill-rectangle] Copy the field at mark into every cell with row and column between that of point and mark. \[array-what-position] Display the current array row and column. \[array-goto-cell] Go to a particular array cell. \[array-make-template] Make a template for a new array. \[array-reconfigure-rows] Reconfigure the array. \[array-expand-rows] Expand the array (remove row numbers and newlines inside rows) \[array-display-local-variables] Display the current values of local variables. Entering array mode calls the function `array-mode-hook'. (defalias 'array-mode #[nil "!!!!!!!!!!!!!  !!!" [make-local-variable max-row max-column columns-per-line field-width rows-numbered line-length lines-per-row buffer-line buffer-column array-row array-column copy-string respect-tabs nil array-init-local-variables array-mode major-mode "Array" mode-name force-mode-line-update make-variable-buffer-local truncate-lines t overwrite-mode use-local-map array-mode-map run-hooks array-mode-hook] 2 (#$ . 18049) nil]) #@68 Initialize the variables associated with the array in this buffer. (defalias 'array-init-local-variables #[nil " !" [array-init-max-row array-init-max-column array-init-columns-per-line array-init-field-width array-init-rows-numbered array-init-line-length array-init-lines-per-row message ""] 2 (#$ . 21558)]) #@34 Initialize the value of max-row. (defalias 'array-init-max-row #[(&optional arg) " !!" [arg string-to-int read-input "Number of array rows: " max-row] 3 (#$ . 21898)]) #@37 Initialize the value of max-column. (defalias 'array-init-max-column #[(&optional arg) " !!" [arg string-to-int read-input "Number of array columns: " max-column] 3 (#$ . 22081)]) #@43 Initialize the value of columns-per-line. (defalias 'array-init-columns-per-line #[(&optional arg) " !!" [arg string-to-int read-input "Array columns per line: " columns-per-line] 3 (#$ . 22276)]) #@38 Initialize the value of field-width. (defalias 'array-init-field-width #[(&optional arg) " !!" [arg string-to-int read-input "Field width: " field-width] 3 (#$ . 22488)]) #@40 Initialize the value of rows-numbered. (defalias 'array-init-rows-numbered #[(&optional arg) "!" [arg y-or-n-p "Rows numbered? " rows-numbered] 2 (#$ . 22674)]) #@38 Initialize the value of line-length. (defalias 'array-init-line-length #[(&optional arg) " \n_" [arg field-width columns-per-line line-length] 2 (#$ . 22850)]) #@40 Initialize the value of lines-per-row. (defalias 'array-init-lines-per-row #[(&optional arg) "\nS \"\fł\\" [arg floor max-column columns-per-line rows-numbered 2 1 lines-per-row] 3 (#$ . 23023)])