MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.217.170.18
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/ses.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:30 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/ses.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

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


(byte-code "\300\301!\210\302\303\304\305\306\307\310\311\312\313\314\315&\210\316\317\320\321\310\303\322\323&\210\316\324\325\326\310\303\322\327&\210\316\330\331\332\310\303\322\333&\210\316\334\335\336\310\303\322\337\340\341&	\210\316\342\304\343\310\303\322\337&\207" [require unsafep custom-declare-group ses nil "Simple Emacs Spreadsheet." :tag "SES" :group applications :prefix "ses-" :version "21.1" custom-declare-variable ses-initial-size '(1 . 1) "Initial size of a new spreadsheet, as a cons (NUMROWS . NUMCOLS)." :type (cons (integer :tag "numrows") (integer :tag "numcols")) ses-initial-column-width 7 "Initial width of columns in a new spreadsheet." (integer :match (lambda (widget value) (> value 0))) ses-initial-default-printer "%.7g" "Initial default printer for a new spreadsheet." (choice string (list :tag "Parenthesized string" string) function) ses-after-entry-functions '(forward-char) "Things to do after entering a value into a cell.\nAn abnormal hook that usually runs a cursor-movement function.\nEach function is called with ARG=1." hook :options (forward-char backward-char next-line previous-line) ses-mode-hook "Hook functions to be run upon entering SES mode."] 12)
#@43 List of formulas that have been typed in.
(defvar ses-read-cell-history nil (#$ . 1753))
#@52 List of printer functions that have been typed in.
(defvar ses-read-printer-history nil (#$ . 1848))
#@72 Context menu when mouse-3 is used on the header-line in an SES buffer.
(defvar ses-header-line-menu nil (#$ . 1955))
(easy-menu-do-define 'ses-header-line-menu nil "Context menu when mouse-3 is used on the header-line in an SES buffer." '("SES header row" ["Set current row" ses-set-header-row t] ["Unset row" ses-unset-header-row (> ses--header-row 0)]))
#@44 Local keymap for Simple Emacs Spreadsheet.
(defconst ses-mode-map (byte-code "\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\327\331\332BBBBBBBBBBBBBBBBBBBBBBBB\333 \211\203P\334	\n@\n\211A@)#\210\n\211AA)\211\2049	*\207" [ses-header-line-menu newmap keys x "\214" ses-reconstruct-all "\f" ses-recalculate-all "" ses-renarrow-buffer "" ses-recalculate-cell "\223" ses-sort-column "\210" ses-set-header-row "" ses-truncate-cell "\n" ses-jump "" ses-read-default-printer "\214" ses-reprint-all [33554444] [header-line down-mouse-3] ([header-line mouse-2] ses-sort-column-click) make-sparse-keymap define-key] 26) (#$ . 2317))
#@24 Menu bar menu for SES.
(defvar ses-menu nil (#$ . 3006))
(easy-menu-do-define 'ses-menu ses-mode-map "Menu bar menu for SES." '("SES" ["Insert row" ses-insert-row (ses-in-print-area)] ["Delete row" ses-delete-row (ses-in-print-area)] ["Insert column" ses-insert-column (ses-in-print-area)] ["Delete column" ses-delete-column (ses-in-print-area)] ["Set column printer" ses-read-column-printer t] ["Set column width" ses-set-column-width t] ["Set default printer" ses-read-default-printer t] ["Jump to cell" ses-jump t] ["Set cell printer" ses-read-cell-printer t] ["Recalculate cell" ses-recalculate-cell t] ["Truncate cell display" ses-truncate-cell t] ["Export values" ses-export-tsv t] ["Export formulas" ses-export-tsf t]))
#@47 Local keymap for SES minibuffer cell-editing.
(defconst ses-mode-edit-map (byte-code "\303\304 \305\n\"\210	\203\306	\211A@	\211A@#\210\202\n*\207" [newmap keys minibuffer-local-map ("" ses-insert-range "" ses-insert-ses-range [S-mouse-3] ses-insert-range-click [C-S-mouse-3] ses-insert-ses-range-click "\211" lisp-complete-symbol) make-sparse-keymap set-keymap-parent define-key] 5) (#$ . 3739))
(byte-code "\306\307\310\311\312\313 \314\315\"\210	G\316\f
W\203,\317	\f\211TO\320#\210\fT\211\202*\n\203J\321\n@\n\211A@)\322 $\210\n\211AA)\211\2041\317\323\324#\210\203k\317@\211A@)#\210\211AA)\211\204T,\"\207" [newmap numeric repl keys x --dotimes-limit-- defalias ses-mode-print-map ([backtab] backward-char [tab] ses-forward-or-insert "	" ses-forward-or-insert "\357" ses-insert-column "" ses-insert-row "
" ses-edit-cell "\353" ses-delete-column "\371" ses-yank-pop "" ses-delete-row "\n" ses-append-row-jump-first-column "\350" ses-mark-row "\310" ses-mark-column "" ses-clear-cell-forward "" ses-clear-cell-backward "(" ses-read-cell "\"" ses-read-cell "'" ses-read-symbol "=" ses-edit-cell "c" ses-recalculate-cell "j" ses-jump "p" ses-read-cell-printer "t" ses-truncate-cell "w" ses-set-column-width "x" ses-export-keymap "\360" ses-read-column-printer) (clipboard-kill-region ses-kill-override end-of-line ses-end-of-line kill-line ses-delete-row kill-region ses-kill-override open-line ses-insert-row) "0123456789.-" make-keymap suppress-keymap t 0 define-key ses-read-cell substitute-key-definition current-global-map [(menu-bar) edit cut] ses-kill-override] 8)
(defconst ses-mode-print-map (symbol-function 'ses-mode-print-map))
(byte-code "\301\302\303\304!\305\306\307\310B#\210\305\311\312\313B#\210)\"\207" [map defalias ses-export-keymap make-sparse-keymap "SES export" define-key "T" " tab-formulas" ses-export-tsf "t" " tab-values" ses-export-tsv] 7)
#@71 Marker string denoting the boundary between print area and data area.
(defconst ses-print-data-boundary "\n\f\n" (#$ . 5668))
#@77 Initial contents for the three-element list at the bottom of the data area.
(defconst ses-initial-global-parameters "\n( ;Global parameters (these are read first)\n 2 ;SES file-format\n 1 ;numrows\n 1 ;numcols\n)\n\n" (#$ . 5800))
#@71 Initial contents for the file-trailer area at the bottom of the file.
(defconst ses-initial-file-trailer ";; Local Variables:\n;; mode: ses\n;; End:\n" (#$ . 6037))
#@47 The initial contents of an empty spreadsheet.
(defconst ses-initial-file-contents (concat "       \n" ses-print-data-boundary "(ses-cell A1 nil nil nil nil)\n" "\n" "(ses-column-widths [7])\n" "(ses-column-printers [nil])\n" "(ses-default-printer \"%.7g\")\n" "(ses-header-row 0)\n" ses-initial-global-parameters ses-initial-file-trailer) (#$ . 6208))
#@73 Display properties to create a raised box for cells in the header line.
(defconst ses-box-prop '(:box (:line-width 2 :style released-button)) (#$ . 6566))
#@269 List of print functions to be included in initial history of printer
functions.  None of these standard-printer functions is suitable for use as a
column printer or a global-default printer because they invoke the column or
default printer and then modify its output.
(defconst ses-standard-printer-functions '(ses-center ses-center-span ses-dashfill ses-dashfill-span ses-tildefill-span) (#$ . 6728))
#@37 Buffer-local variables used by SES.
(defconst ses-localvars '(ses--blank-line ses--cells ses--col-printers ses--col-widths ses--curcell ses--curcell-overlay ses--default-printer ses--deferred-narrow ses--deferred-recalc ses--deferred-write ses--file-format (ses--header-hscroll . -1) ses--header-row ses--header-string ses--linewidth ses--numcols ses--numrows ses--symbolic-formulas ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb . 0) ses--Dijkstra-weight-bound ses--renamed-cell-symb-list mode-line-process next-line-add-newlines transient-mark-mode) (#$ . 7136))
#@53 Set buffer-local and initialize some SES variables.
(defalias 'ses-set-localvars #[nil "\303\211\2056\n@\2119\203\304	!\303L\210\202.	:\203)\304	@!	AL\210\202.\305\306	\"\210\nA\211\204\303*\207" [ses-localvars x --dolist-tail-- nil make-local-variable error "Unexpected elements `%S' in list `ses-localvars'"] 4 (#$ . 7722)])
(put 'ses--symbolic-formulas 'safe-local-variable 'consp)
#@101 Offsets from 'Global parameters' line to various parameter lines in the
data area of a spreadsheet.
(defconst ses-paramlines-plist '(ses--col-widths -5 ses--col-printers -4 ses--default-printer -3 ses--header-row -2 ses--file-format 1 ses--numrows 2 ses--numcols 3) (#$ . 8127))
#@318 Set by `ses-relocate-formula' and `ses-relocate-range', read by
`ses-relocate-all'.  Set to 'delete if a cell-reference was deleted from a
formula--so the formula needs recalculation.  Set to 'range if the size of a
`ses-range' was changed--so both the formula's value and list of dependents
need to be recalculated.
(defvar ses-relocate-return nil (#$ . 8413))
#@202 Set to t if last cell printer invoked by `ses-call-printer' requested
left-justification of the result.  Set to error-signal if `ses-call-printer'
encountered an error during printing.  Otherwise nil.
(defvar ses-call-printer-return nil (#$ . 8782))
#@107 Time when current operation started.  Used by `ses-time-check' to decide
when to emit a progress message.
(defvar ses-start-time nil (#$ . 9039))
#@73 Return the cell structure that stores information about cell (ROW,COL).
(defalias 'ses-get-cell '(macro . #[(row col) "\302\211\303E	E\207" [row col aref ses--cells] 4 (#$ . 9191)]))
(defalias 'ses-make-cell #[(&optional symbol formula printer references property-list) "\305	\n\f%\207" [symbol formula printer references property-list vector] 6])
(put 'ses-make-cell 'byte-optimizer 'byte-compile-inline-expand)
#@112 From a CELL or a pair (ROW,COL), get the symbol that names the local-variable holding its value.  (0,0) => A1.
(defalias 'ses-cell-symbol '(macro . #[(row &optional col) "\302\203\f\303	E\202
	\304BB\207" [col row aref ses-get-cell (0)] 4 (#$ . 9614)]))
(put 'ses-cell-symbol 'safe-function t)
#@76 From a CELL or a pair (ROW,COL), get the function that computes its value.
(defalias 'ses-cell-formula '(macro . #[(row &optional col) "\302\203\f\303	E\202
	\304BB\207" [col row aref ses-get-cell (1)] 4 (#$ . 9918)]))
#@55 From a CELL set the function that computes its value.
(defalias 'ses-cell-formula-aset '(macro . #[(cell formula) "\302\303	F\207" [cell formula aset 1] 4 (#$ . 10147)]))
#@74 From a CELL or a pair (ROW,COL), get the function that prints its value.
(defalias 'ses-cell-printer '(macro . #[(row &optional col) "\302\203\f\303	E\202
	\304BB\207" [col row aref ses-get-cell (2)] 4 (#$ . 10325)]))
#@104 From a CELL or a pair (ROW,COL), get the list of symbols for cells whose
functions refer to its value.
(defalias 'ses-cell-references '(macro . #[(row &optional col) "\302\203\f\303	E\202
	\304BB\207" [col row aref ses-get-cell (3)] 4 (#$ . 10554)]))
#@100 From a CELL set the list REFERENCES of symbols for cells the
function of which refer to its value.
(defalias 'ses-cell-references-aset '(macro . #[(cell references) "\302\303	F\207" [cell references aset 3] 4 (#$ . 10816)]))
#@55 Return non `nil' is CELL is a cell of current buffer.
(defalias 'ses-cell-p #[(cell) "\303!\205\"G\304U\205\"\305\306H!\211:\205 \n	@H	AH)=\207" [cell rowcol ses--cells vectorp 5 ses-sym-rowcol 0] 5 (#$ . 11048)])
(defalias 'ses-cell-property-get-fun #[(property-name cell) "\306H\307	\n\"\211\205L\211A@)	=\203
\202K\211AA)\211\2039A\241\210@\240\210\202@\310	\311\"\312\241\210)\306\n
	BBI\210
)*\207" [cell plist property-name ret x val 4 plist-member last 1 nil next] 6])
#@202 Get property named PROPERTY-NAME from a CELL or a pair (ROW,COL).

When COL is omitted, CELL=ROW is a cell object.  When COL is
present ROW and COL are the integer coordinates of the cell of
interest.
(defalias 'ses-cell-property-get '(macro . #[(property-name row &optional col) "\303	\203
\304\n	E\202\nE\207" [property-name col row ses-cell-property-get-fun ses-get-cell] 5 (#$ . 11563)]))
(put 'ses-cell-property-get 'edebug-form-spec t)
(defalias 'ses-cell-property-delq-fun #[(property-name cell) "\304\305H	\"\211\205\n\211\211AA)\241)\207" [cell property-name ret x plist-get 4] 4])
(defalias 'ses-cell-property-set-fun #[(property-name property-val cell) "\305H\306	\n\"\211\203A\f\240\202\305\n\f	BBI*\207" [cell plist property-name ret property-val 4 plist-member] 6])
#@126 From a CELL or a pair (ROW,COL), set the property value of
the corresponding cell with name PROPERTY-NAME to PROPERTY-VALUE.
(defalias 'ses-cell-property-set '(macro . #[(property-name property-value row &optional col) "\203\304	\n\203\305\nE\202F\207\306	\n\203\"\305\nE\202#E\207" [property-value property-name col row ses-cell-property-set-fun ses-get-cell ses-cell-property-delq-fun] 6 (#$ . 12368)]))
(defalias 'ses-cell-property-pop-fun #[(property-name cell) "\306H\307	\n\"\211\205A\211A@)\211AA)\211\203+
A\241\210
@\240\210\202@	=\2039\306\310I\210\202@\311	\312\"\310\241\210)*\207" [cell plist property-name ret x next 4 plist-member nil last 2] 5])
#@119 From a CELL or a pair (ROW,COL), get and remove the property value of
the corresponding cell with name PROPERTY-NAME.
(defalias 'ses-cell-property-pop '(macro . #[(property-name row &optional col) "\303	\203
\304\n	E\202\nE\207" [property-name col row ses-cell-property-pop-fun ses-get-cell] 5 (#$ . 13068)]))
(defalias 'ses-cell-property-get-handle-fun #[(property-name cell) "\306H\307	\n\"\211\203P	=\203A\202\\\211A@)\211AA)
\2038
A\241\210
@\240\210\202?\310	\311\"\312\241\210	B\306\nBI\210*\202\\\312	B\306\nBI\210*\207" [cell plist property-name ret x next 4 plist-member last 2 nil val] 5])
#@142 From a CELL or a pair (ROW,COL), get a cons cell whose car is
the property value of the corresponding cell property with name
PROPERTY-NAME.
(defalias 'ses-cell-property-get-handle '(macro . #[(property-name row &optional col) "\303	\203
\304\n	E\202\nE\207" [property-name col row ses-cell-property-get-handle-fun ses-get-cell] 5 (#$ . 13710)]))
(byte-code "\300\301\302\"\210\300\303\304\"\207" [defalias ses-cell-property-handle-car car ses-cell-property-handle-setcar setcar] 3)
#@71 From a CELL or a pair (ROW,COL), get the current value for that cell.
(defalias 'ses-cell-value '(macro . #[(row &optional col) "\302\303	ED\207" [row col symbol-value ses-cell-symbol] 4 (#$ . 14203)]))
#@34 Return the width for column COL.
(defalias 'ses-col-width '(macro . #[(col) "\301\302E\207" [col aref ses--col-widths] 3 (#$ . 14413)]))
#@44 Return the default printer for column COL.
(defalias 'ses-col-printer '(macro . #[(col) "\301\302E\207" [col aref ses--col-printers] 3 (#$ . 14557)]))
#@124 From a cell-symbol SYM, gets the cons (row . col).  A1 => (0 . 0).
Result is nil if SYM is not a symbol that names a cell.
(defalias 'ses-sym-rowcol '(macro . #[(sym) "\301\302D\303\304BBE\207" [sym and symbolp get ('ses-cell)] 5 (#$ . 14716)]))
#@269 Load a cell SYM from the spreadsheet file.  Does not recompute VALUE from
FORMULA, does not reprint using PRINTER, does not check REFERENCES.  This is a
macro to prevent propagate-on-load viruses.  Safety-checking for FORMULA and
PRINTER are deferred until first use.
(defalias 'ses-cell '(macro . #[(sym value formula printer references) "9\205\306N\307\n!\210\310!\210\n:\203 \f\311=\204 \312\nD\2033;\2043\f\311=\2043\313D
	@H	A\n\314\315\n%-I\210)L\210\207" [sym rowcol formula printer safe-functions ses--cells ses-cell ses-formula-record ses-printer-record t ses-safe-formula ses-safe-printer nil vector references property-list symbol value] 8 (#$ . 14971)]))
#@116 Load the vector of column widths from the spreadsheet file.  This is a
macro to prevent propagate-on-load viruses.
(defalias 'ses-column-widths '(macro . #[(widths) "\305!\203
G	U\204\306\307!\210\310\311\312\313\314\"#\315\316\"\317P\320\207" [widths ses--numcols ses--col-widths ses--linewidth ses--blank-line vectorp error "Bad column-width vector" apply + -1 mapcar 1+ make-string 32 "\n" t] 6 (#$ . 15684)]))
#@145 Load the vector of column printers from the spreadsheet file and checks
them for safety.  This is a macro to prevent propagate-on-load viruses.
(defalias 'ses-column-printers '(macro . #[(printers) "\305!\203
G	U\204\306\307!\210	\310\nW\203+\n\311\nH!I\210\nT\211\202*\312\313\"\210\314\207" [printers ses--numcols x --dotimes-limit-- ses--col-printers vectorp error "Bad column-printers vector" 0 ses-safe-printer mapc ses-printer-record t] 6 (#$ . 16116)]))
#@140 Load the global default printer from the spreadsheet file and checks it
for safety.  This is a macro to prevent propagate-on-load viruses.
(defalias 'ses-default-printer '(macro . #[(def) "\302!\303!\210\304\207" [def ses--default-printer ses-safe-printer ses-printer-record t] 2 (#$ . 16601)]))
#@128 Load the header row from the spreadsheet file and checks it
for safety.  This is a macro to prevent propagate-on-load viruses.
(defalias 'ses-header-row '(macro . #[(row) "\303!\203\304	!\204	W\204\305\306!\210\307\207" [row ses--numrows ses--header-row wholenump zerop error "Bad header-row" t] 2 (#$ . 16907)]))
#@198 Execute BODY repeatedly, with the variables `row' and `col' set to each
cell in the range specified by CURCELL.  The range is available in the
variables `minrow', `maxrow', `mincol', and `maxcol'.
(defalias 'ses-dorange '(macro . #[(curcell &rest body) "\306\307!\306\310!\306\311!\306\312!\306\313!\314\f
D\315\316\317\fD\320\fD\fFDD\n\315\316\317\fD\321\fD\fFDDE\322\323\320DD\324\320\nDD\325\321DD\326\321\nDD\327BBBB\330\331	\332B\333\334\335	\336BBE\331\337B\333\340\335\341BBE\"BBBFFE-\207" [c r max min cur curcell make-symbol "cur" "min" "max" "r" "c" let* ses-sym-rowcol if consp car cdr let minrow maxrow mincol maxcol (row col) (if (or (> minrow maxrow) (> mincol maxcol)) (error "Empty range")) dotimes ((- maxrow minrow -1)) setq row + (minrow) ((- maxcol mincol -1)) col (mincol) body] 15 (#$ . 17238)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put ses-dorange lisp-indent-function defun edebug-form-spec (form body)] 4)
#@90 For code-coverage testing, indicate that FORM is expected to always have
the same value.
(defalias '1value '(macro . #[(form) "\207" [form] 1 (#$ . 18207)]))
#@76 For code-coverage testing, indicate that FORM will always signal an error.
(defalias 'noreturn '(macro . #[(form) "\207" [form] 1 (#$ . 18372)]))
#@93 Create a new vector which is one larger than ARRAY and has NEW inserted
before element IDX.
(defalias 'ses-vector-insert #[(array idx new) "G\306	T\n\"	\307\f
W\203-\fW\203\f\202!\fT\fHI\210\fT\211\202**\207" [array len new result x --dotimes-limit-- make-vector 0 idx] 5 (#$ . 18525)])
#@224 Create a new vector which is a copy of ARRAY with COUNT objects removed
starting at element IDX.  ARRAY is either a vector or a symbol whose value
is a vector--if a symbol, the new vector is assigned as the symbol's value.
(defalias 'ses-vector-delete #[(array idx count) "\306!\203\n\202\fJ\211G\nZ\307\310\"\311\n
\nW\203>\f
	
W\2031
\2024
\n\\HI\210
T\211\202*9\203H\fL\210\f+\207" [array a count len result x arrayp make-vector nil 0 --dotimes-limit-- idx] 6 (#$ . 18836)])
#@37 Like `kill-line', but no kill ring.
(defalias 'ses-delete-line #[(count) "`	y\210`|)\207" [pos count] 2 (#$ . 19344)])
#@61 Signal an error if PRINTER is not a valid SES cell printer.
(defalias 'ses-printer-validate #[(printer) "\203;\204\301!\204\242;\203A\203\302\303!\210\207" [printer functionp error "Invalid printer function"] 2 (#$ . 19471)])
#@123 Add PRINTER to `ses-read-printer-history' if not already there, after first
checking that it is a valid printer function.
(defalias 'ses-printer-record #[(printer) "\301!\210\205\302\303\304!\"\207" [printer ses-printer-validate add-to-list ses-read-printer-history prin1-to-string] 4 (#$ . 19720)])
#@98 If FORMULA is of the form 'symbol, add it to the list of symbolic formulas
for this spreadsheet.
(defalias 'ses-formula-record #[(formula) "\242\302=\205\211A@)9\205\303\304\305\211A@)!C\"\207" [formula x quote add-to-list ses--symbolic-formulas symbol-name] 5 (#$ . 20031)])
#@99 Return the alphabetic name of column number COL.
0-25 become A-Z; 26-701 become AA-ZZ, and so on.
(defalias 'ses-column-letter #[(col) "\302\303\304\246\\!\304W\203	\202\305\304\245S!	P)\207" [col units char-to-string 65 26 ses-column-letter] 4 (#$ . 20322)])
#@64 Produce a symbol that names the cell (ROW,COL).  (0,0) => 'A1.
(defalias 'ses-create-cell-symbol #[(row col) "\302\303!\304	T!P!\207" [col row intern ses-column-letter number-to-string] 4 (#$ . 20596)])
#@61 Create buffer-local variables for cells.  This is undoable.
(defalias 'ses-create-cell-variable-range #[(minrow maxrow mincol maxcol) "\306\307	\n\257\fB\310\211\211	ZT\311W\205i\nZT\311W\203_\\\n\\\312
\"\313\314
B#\210\315!\210T\211\202/*T\211\202-\207" [minrow maxrow mincol maxcol buffer-undo-list xcol apply ses-destroy-cell-variable-range nil 0 ses-create-cell-symbol put ses-cell make-local-variable xrow sym row --dotimes-limit-- col] 7 (#$ . 20806)])
#@230 Create a buffer-local variable `SYM' for cell at position (ROW, COL).

SYM is the symbol for that variable, ROW and COL are integers for
row and column of the cell, with numbering starting from 0.

Return nil in case of failure.
(defalias 'ses-create-cell-variable #[(sym row col) "\303!?\205\304!\210\305\306	\nB#\207" [sym row col local-variable-p make-local-variable put ses-cell] 5 (#$ . 21331)])
#@62 Destroy buffer-local variables for cells.  This is undoable.
(defalias 'ses-destroy-cell-variable-range #[(minrow maxrow mincol maxcol) "\306	\nZT\307\fW\203u
ZT\307\fW\203m\n\\\\\211W\203GW\203GHH\307H\202M\310\"*\311!\203`\312\313\211JFB\314!\210T\211\202*T\211\202\n+\312\315\n	
\257B\211\207" [sym maxrow minrow row --dotimes-limit-- maxcol nil 0 ses-create-cell-symbol boundp apply ses-set-with-undo kill-local-variable ses-create-cell-variable-range mincol col xcol xrow ses--numrows ses--numcols ses--cells buffer-undo-list] 7 (#$ . 21743)])
#@89 Flag the header string for update.  Upon undo, the header string will be
updated again.
(defalias 'ses-reset-header-string #[nil "\302B\303\211\207" [buffer-undo-list ses--header-hscroll (apply ses-reset-header-string) -1] 2 (#$ . 22364)])
#@138 If `ses-start-time' is more than a second ago, call `message' with FORMAT
and (eval ARG) and reset `ses-start-time' to the current time.
(defalias 'ses-time-check #[(format arg) "\303 Z\304V\203\305	\306\n!\"\210\303 \307\207" [ses-start-time format arg float-time 1.0 message eval nil] 4 (#$ . 22614)])
#@172 Install VAL as the contents for field FIELD (named by a quoted symbol) of
cell (ROW,COL).  This is undoable.  The cell's data will be updated through
`post-command-hook'.
(defalias 'ses-set-cell #[(row col field val) "	H\nH\306\307\"\310
\204\311\312\310\"\210
\313=\203(\314\315H\"\202/\316
#\211\203;\317\320	\nB\"\210+\310\207" [ses--cells row col field change elt plist-get (value t symbol 0 formula 1 printer 2 references 3) nil signal args-out-of-range t ses-set-with-undo 0 ses-aset-with-undo add-to-list ses--deferred-write cell val] 5 (#$ . 22929)])
#@348 Store a new formula for (ROW . COL) and enqueue the cell for
recalculation via `post-command-hook'.  Updates the reference lists for the
cells that this cell refers to.  Does not update cell value or reprint the
cell.  To avoid inconsistencies, this function is not interruptible, which
means Emacs will crash if FORMULA contains a circular list.
(defalias 'ses-cell-set-formula #[(row col formula) "	H\nH\211\306H\307H\310\f!\310
!\311\312\211\211\313\314\"\210\312\211\203u@\211>\204l9\205L\315N\211@A\316\317\320HH\321H\"$\210A\211\2046*\312\211\203\303@\2119\205\217\315N\211@AHH\321H>\204\272\316\317B$\210A\211\204\201*\322
!\210\316	\n\305
$.	\207" [ses--cells row col cell old formula 1 0 ses-formula-references t nil add-to-list ses--deferred-recalc ses-cell ses-set-cell references delq 3 ses-formula-record xcol xrow x inhibit-quit newref oldref sym ref --dolist-tail--] 9 (#$ . 23515)])
#@72 Repair cell reference and warn if there was some reference corruption.
(defalias 'ses-repair-cell-reference-all #[nil "\306	\307\nW\203D\f\307
W\203<\310\311\nH
H\"\211\2034\nH
H\307H\312EB)
T\211\202*\nT\211\202*	\307\nW\203\314\f\307
W\203\304\nH
H\211\307H\313H\314!\211 \306!\211\"\203\273\"@\211!9\205\212!\315N#\316\311#@H#AH\"$!\317$!>\204\261\320$\317$!B\"\210*\"A\211\"\204|.
T\211\202T*\nT\211\202J*	\307\nW\203i\f\307
W\203a\nH
H\211\321H%\310\311\" \306& \306!\211\"\203*\"@\211!%>\203\322!%\"%\202!!&B&\"A\211\"\204*\323\n
\324 $\210&\204=%\203Y\307H\325&\205K\326&D%\205T\327%D\"BB,
T\211\202\334*\nT\211\202\322*\203u\330\331\"\202x\332\333!)\207" [errors ses--numrows row --dotimes-limit-- ses--numcols col nil 0 ses-cell-property-pop-fun :ses-repair-reference :corrupt-property 1 ses-formula-references ses-cell ses-cell-property-get-handle-fun ses-cell-property-handle-car ses-cell-property-handle-setcar 3 delq ses-set-cell references append :missing :irrelevant warn "----------------------------------------------------------------\nSome references were corrupted.\n\nThe following is a list where each element ELT is such\nthat (car ELT) is the reference of cell CELL with corruption,\nand (cdr ELT) is a property list where\n\n* property `:corrupt-property' means that\n  property `:ses-repair-reference' of cell CELL was initially non\n  nil,\n\n* property `:missing' is a list of missing references\n\n* property `:irrelevant' is a list of non needed references\n\n%S" message "No reference corruption found" ses--cells cell sym formula new-ref ref --dolist-tail-- rowcol h irrelevant missing] 6 (#$ . 24530) "*"])
#@463 Calculate and print the value for cell (ROW,COL) using the cell's formula
function and print functions, if any.  Result is nil for normal operation, or
the error signal if the formula or print function failed.  The old value is
left unchanged if it was *skip* and the new value is nil.
  Any cells that depend on this cell are queued for update after the end of
processing for the current keystroke, unless the new value is the same as
the old and FORCE is nil.
(defalias 'ses-calculate-cell #[(row col force) "	H\nH\306\211\211\211\307HJ\310H\306\211\211\211\211\211\211\242\311=\203J\311\211A@)!\312	\n\313$\210\314\315\316\217\210\204^\317=\203^\317\320\321\215\210.	\322	\n\"
\203u\323\324
!!\206z\f\206z,\207" [ses--cells row col printer-error formula-error cycle-error nil 0 1 ses-safe-formula ses-set-cell formula sig (byte-code "\302!\302\207" [formula newval eval] 2) ((error (byte-code "	\304HC\244\210\305\304\207" [sig cell formula-error newval 0 *error*] 3))) *skip* cycle (byte-code "\204\n	\n=\204\342\306\307\fB\"\210\310\311
\"\312!\211\2040\313\314B\211\"\210\202D@U\204D\240\210\314\241\210AT\315\f\316	$\210
\317H\320\211\203\341@\306\321\"\2109\205r\322N\310\311@HAH\" \312 !\211!\204\235\313 B\211!\"\210\202\276!@U\203\262!\211A]\241\210\202\276!\240\210!\241\210\"V\203\330\323\324\325\326\327
\314H\"D\211#\211$\"\210A\211\204]*\320\207" [force newval oldval row col cell add-to-list ses--deferred-write ses-cell-property-get-handle-fun :ses-Dijkstra-attempt ses-cell-property-handle-car ses-cell-property-handle-setcar 0 ses-set-cell value 3 nil ses--deferred-recalc ses-cell throw cycle error format "Found cycle on cells %S" this-cell-Dijkstra-attempt-h this-cell-Dijkstra-attempt ses--Dijkstra-attempt-nb this-cell-Dijkstra-attempt+1 ref --dolist-tail-- ref-rowcol ses--cells ref-cell-Dijkstra-attempt-h ref-cell-Dijkstra-attempt ses--Dijkstra-weight-bound formula-error cycle-error] 8) ses-print-cell error error-message-string cell ref-rowcol ref-cell-Dijkstra-attempt ref-cell-Dijkstra-attempt-h this-cell-Dijkstra-attempt+1 this-cell-Dijkstra-attempt this-cell-Dijkstra-attempt-h newval oldval x] 10 (#$ . 26312)])
#@48 Delete formula and printer for cell (ROW,COL).
(defalias 'ses-clear-cell #[(row col) "\302	\303\304$\210\305	\304#\207" [row col ses-set-cell printer nil ses-cell-set-formula] 5 (#$ . 28616)])
#@70 True if cycle detection is early for cells that refer to themselves.
(custom-declare-variable 'ses-self-reference-early-detection nil '(#$ . 28817) :version "24.1" :type 'boolean :group 'ses)
#@188 Recalculate cells in LIST, checking for dependency loops.  Prints
progress messages every second.  Dependent cells are not recalculated
if the cell's value is unchanged and FORCE is nil.
(defalias 'ses-update-cells #[(list &optional force) "\211`\306\211\211\211\211\307\306\310\216\203*\311 \312\313\"\210\203\241\f\203:\312\314G\"\210\306
\203~
\211A@\2119\205U\315N\n@H\nAH\316H\317\320\215\204C \203r\321\322!\204C\323\n@\nA!#\210\202C\306\211\"\203\235\"@\324\325\"\210\"A\211\"\204\211*\202*\203\341\306#\211\"\203\332\"@\211#9\205\277#\315N\326\n@\nA\327\330$\210\331\n@\nA\"\210)\"A\211\"\204\261*\321\332\"\210\312\307!\210+b.\207" [list formula this-rowcol this-sym prevlist curlist nil " " ((byte-code "\203	\203\302\303	\"\210\202\302\304!\210\304\207" [#1=#:with-temp-message #2=#:current-message message #3="%s" nil] 3)) current-message message #3# "Recalculating... (%d cells left)" ses-cell 1 ref (byte-code "\306!\307\211\205>\n@\203	\f=\203\310\311\f\"\210\2026	
>\204,	>\2036\312\313\f\"\210\314\301\315\"\210\nA\211\204\n\307*\207" [formula ref --dolist-tail-- ses-self-reference-early-detection this-sym curlist ses-formula-references nil error "Cycle found: cell %S is self-referring" add-to-list ses--deferred-recalc throw t] 4) error "Quit" ses-calculate-cell add-to-list nextlist ses-set-cell value *error* ses-print-cell "Circular references: %s" pos ses--deferred-recalc #2# #1# ses--cells quit-flag force --dolist-tail-- x] 9 (#$ . 29016)])
#@52 Return t if point is in print area of spreadsheet.
(defalias 'ses-in-print-area #[nil "`X\207" [ses--data-marker] 2 (#$ . 30603)])
#@46 Move point to print area for cell (ROW,COL).
(defalias 'ses-goto-print #[(row col) "\306\307eb\210\ny\210\307\f
W\203$\310\f\fH\311#\fT\211\202*\312!V\2053l\2053\313u*\207" [n inhibit-point-motion-hooks row col c --dotimes-limit-- t 0 + 1 move-to-column nil ses--col-widths] 5 (#$ . 30741)])
#@117 Set `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a
region, or nil if cursor is not at a cell.
(defalias 'ses-set-curcell #[nil "\203	\204\306 \307 U\203\310`\311\"\202A\310\306 \311\"\310\307 S\311\"\307 
U\2034\310\307 \312Z\311\"\f\205?\205?\fB*\313\207" [mark-active deactivate-mark ses--curcell ecell bcell ses--data-marker region-beginning region-end get-text-property intangible 2 nil] 4 (#$ . 31056)])
#@225 Signal an error if `ses--curcell' is inappropriate.
The end marker is appropriate if some argument is 'end.
A range is appropriate if some argument is 'range.
A single cell is appropriate unless some argument is 'needrange.
(defalias 'ses-check-curcell #[(&rest args) "\302=\203	\303 \210\204\304	>\2065\305\306!\207:\203,\307	>\2065\310	>\2065\305\311!\207\310	>\2055\305\312!\207" [ses--curcell args t ses-set-curcell end error "Not at cell" range needrange "Can't use a range" "Need a range"] 2 (#$ . 31512)])
#@484 Format and print the value of cell (ROW,COL) to the print area.
Use the cell's printer function.  If the cell's new print form is too wide,
it will spill over into the following cell, but will not run off the end of the
row or overwrite the next non-nil field.  Result is nil for normal operation,
or the error signal if the printer function failed and the cell was formatted
with "%s".  If the cell's value is *skip*, nothing is printed because the
preceding cell has spilled over.
(defalias 'ses-print-cell #[(row col) "\300\301\215\207" [ses-print-cell (byte-code "	H\nH\211\306HJ\307H\nT/\310\21101\310\21123\f\311=\203-\312\313\310\"\210\202s\f\314=\203?\3154\nH\316\"0\202s
\242\317=\203W\320	\n\305\317
\2113A@)!\211$\210\321
\206e5\nH\206e6\f\"07:\203s714\nH\3220!8989W\203\252\31598Z\323\"87\324=\203\24008P\202\24580P0\202k89V\203k9:8:V\203\375/;W\203\375	H/H\306HJ\2113\203\3343\311=\203\3753\204\351\320	/\304\311$\210\325:4/H\326#:/T/\202\2668:X\2030\315:8Z\323\"P0\202j\327\3300E1\f;\203.\3310:\306\323$0\202j\f\247\203c\332\3330\"\203c\306\3348:\306\225\306\224Z#\2119Y\203c0\306\211\2249ZO0\306\225\310OP0\202j\315:\316\"0)*\335\336\3370#0\340	\n\"\210`2\324\211<=\324>`\341i\3220!\\!\210`T|\210)0/;W\203\242\342\202\243\343P3\344\3063G\3103$\210\3453!\210\3462`\347\306H$\210\350	!\203\341\350\n!\203\341\346e`\351\352$\210\346e`\353\354$\210\346eeT\355\324$\210*	?SU\203\355\356 \210/;W\203	H/H\306HJ\311=\203\320	/\304\310$\210\313	/\"\2102b\2101.\207" [ses--cells row col cell value printer 0 2 nil *skip* throw ses-print-cell *error* make-string 35 ses-safe-printer ses-set-cell ses-call-printer string-width 32 t + 1 error "Too wide" truncate-string-to-width string-match "\\.[0-9]+" - replace-regexp-in-string "[	\n]" "?" ses-goto-print move-to-column " " "\n" set-text-properties insert-and-inherit put-text-property intangible zerop keymap ses-mode-print-map read-only ses front-sticky ses-reset-header-string maxcol text sig startpos x ses--col-widths ses--col-printers ses--default-printer ses-call-printer-return len width maxwidth ses--numcols inhibit-quit inhibit-read-only inhibit-point-motion-hooks ses--header-row] 7)] 2 (#$ . 32043)])
#@362 Invoke PRINTER (a string or parenthesized string or function-symbol or
lambda of one argument) on VALUE.  Result is the printed cell as a string.
The variable `ses-call-printer-return' is set to t if the printer used
parenthesis to request left-justification, or the error-signal if the
printer signaled one (and "%s" is used as the default printer), else nil.
(defalias 'ses-call-printer #[(printer &optional value) "\301\302\303\304\217\207" [ses-call-printer-return nil signal (byte-code ";\203	\203\303	\"\207\304\207\242;\203$\305	\203\"\303@	\"\207\304\207	\206*\304!\211;\2033	\207	\242;\204=\306\307!\210\305	@\207" [printer value ses-call-printer-return format "" t error "Printer should return \"string\" or (\"string\")"] 4) ((error (byte-code "\303\n\304\"\207" [signal ses-call-printer-return value prin1-to-string t] 3)))] 3 (#$ . 34358)])
#@156 Insert CHANGE spaces in front of column COL, or at end of line if
COL=NUMCOLS.  Deletes characters if CHANGE < 0.  Caller should bind
`inhibit-quit' to t.
(defalias 'ses-adjust-print-width #[(col change) "\306\307V\205\310\311\"	\nU\312\313\\\"\210\312\314\310\311\"\315P\"\210\307W\205\\\316	\"\210\203D\306\317u\210)\f\203N\fc\210\202S\320[!\210T\211\202--\207" [change col ses--numcols at-end blank inhibit-read-only t 0 make-string 32 ses-set-with-undo ses--linewidth ses--blank-line "\n" ses-goto-print -1 delete-char ses--numrows row --dotimes-limit-- inhibit-point-motion-hooks] 6 (#$ . 35239)])
#@178 Same as `ses-print-cell', except if the cell's value is *skip*,
the preceding nonskipped cell is reprinted.  This function is used
when the width of cell (ROW,COL) has changed.
(defalias 'ses-print-cell-new-width #[(row col) "	H\nH\304HJ\305=\204\306	\n\"\207\307	\n\"\210\310u\210\311`\312\"9\205(\311`\312\"\313N\306@A\")\207" [ses--cells row col rowcol 0 *skip* ses-print-cell ses-goto-print -1 get-text-property intangible ses-cell] 3 (#$ . 35886)])
#@61 Turn off narrowing, to be reenabled at end of command loop.
(defalias 'ses-widen #[nil "deZ\301 U\204\302~\207" [ses--deferred-narrow buffer-size t] 2 (#$ . 36353)])
#@234 Move point to data area for (DEF,COL).  If DEF is a row
number, COL is the column number for a data cell -- otherwise DEF
is one of the symbols ses--col-widths, ses--col-printers,
ses--default-printer, ses--numrows, or ses--numcols.
(defalias 'ses-goto-data #[(def &optional col) "\306 \210\307	\203\nb\210\310\311\fT_	#y\202,\312
\"\211\204&\313\314\315\"\210b\210y)\207" [inhibit-point-motion-hooks col ses--data-marker def ses--numcols ses-paramlines-plist ses-widen t + 1 plist-get signal args-out-of-range nil ses--params-marker] 5 (#$ . 36529)])
#@232 Set parameter DEF to VALUE (with undo) and write the value to the data area.
See `ses-goto-data' for meaning of DEF.  Newlines in the data are escaped.
If ELEM is specified, it is the array subscript within DEF to be set to VALUE.
(defalias 'ses-set-parameter #[(def value &optional elem) "\212\306!\210\307\310\311\"\312\f\203 J\fHJ\f
I\210\202'J
L\210\312`\313 |\210\314\nJ\"c\210)\315\316	\f\257B\211,\207" [def oldval fmt inhibit-read-only elem value ses-goto-data t plist-get (ses--col-widths "(ses-column-widths %S)" ses--col-printers "(ses-column-printers %S)" ses--default-printer "(ses-default-printer %S)" ses--header-row "(ses-header-row %S)" ses--file-format " %S ;SES file-format" ses--numrows " %S ;numrows" ses--numcols " %S ;numcols") nil line-end-position format apply ses-set-parameter buffer-undo-list] 5 (#$ . 37099)])
#@107 Write cells in `ses--deferred-write' from local variables to data area.
Newlines in the data are escaped.
(defalias 'ses-write-cells #[nil "\306\211\307\211\307\211\307\211 !\307\211\"#\310 $\311\307%&\312\216&\2033\313 %\314\315&\"\210\212'\203\307\316\317\320\"\210'\211A'@\211@\nA(H\fH\211\321H 
\322H!
\323H\"!\242\324=\203t!\211)A@)!\"\242\325=\203\206\"\211)A@)\"\326\327 !\311\330 J!\311\330!!\311\330\"!\311
\331H:\204\247\332\202\261\333\334\327
\331H\311#\335Q\335\260#\336\f\"\210`\337 |\210#c\210\2024)\314\311!.
\207" [inhibit-read-only print-escape-newlines rowcol row col cell t nil float-time " " ((byte-code "\203	\203\302\303	\"\210\202\302\304!\210\304\207" [#1=#:with-temp-message #2=#:current-message message #3="%s" nil] 3)) current-message message #3# ses-time-check "Writing... (%d cells left)" (length ses--deferred-write) 0 1 2 ses-safe-formula ses-safe-printer "(ses-cell " symbol-name prin1-to-string 3 "nil" "(" mapconcat ")" ses-goto-data line-end-position sym formula printer text ses-start-time #2# #1# ses--deferred-write ses--cells x] 15 (#$ . 37967)])
#@216 Produce a list of symbols for cells that this FORMULA's value
refers to.  For recursive calls, RESULT-SO-FAR is the list being
constructed, or t to get a wrong-type-argument error when the
first reference is found.
(defalias 'ses-formula-references #[(formula &optional result-so-far) "9\203\304N\203\305\303\"\210\202c:\203c@\306=\203D\307\306A@\3108E!A\311\211\203@\n@\305\303	\"\210\nA\211\2041*\202c@\312=\204c\311\211\203b\n@\313	\"\nA\211\204S*\207" [formula cur --dolist-tail-- result-so-far ses-cell add-to-list ses-range macroexpand 2 nil quote ses-formula-references] 6 (#$ . 39119)])
#@158 Relocate one symbol SYM, which corresponds to ROWCOL (a cons of ROW and
COL).  Cells starting at (STARTROW,STARTCOL) are being shifted
by (ROWINCR,COLINCR).
(defalias 'ses-relocate-symbol #[(sym rowcol startrow startcol rowincr colincr) "@A\211W\204	\fW\203
\202>\n\\	\\\nY\205>	\fY\205>\n	W\205>	\nW\205>\306\n	\"*\207" [rowcol col row startrow startcol sym ses-create-cell-symbol rowincr colincr ses--numrows ses--numcols] 4 (#$ . 39754)])
(put 'ses-relocate-symbol 'byte-optimizer 'byte-compile-inline-expand)
#@495 Produce a copy of FORMULA where all symbols that refer to cells in row
STARTROW or above, and col STARTCOL or above, are altered by adding ROWINCR
and COLINCR.  STARTROW and STARTCOL are 0-based.  Example:
	(ses-relocate-formula '(+ A1 B2 D3) 1 2 1 -1)
	=> (+ A1 B2 C4)
If ROWINCR or COLINCR is negative, references to cells being deleted are
removed.  Example:
	(ses-relocate-formula '(+ A1 B2 D3) 0 1 0 -1)
	=> (+ A1 C3)
Sets `ses-relocate-return' to 'delete if cell-references were removed.
(defalias 'ses-relocate-formula #[(formula startrow startcol rowincr colincr) "\306\211\n:\203\n@\307=\203\211\n9\205\n\310N\211\203\205\311\312\313\n!\"\203\205\n	\f
	@	A\211W\204J\fW\203O\202\200
\\\\Y\205\200\fY\205\200W\205\200W\205\200\314\".\202i\n\202i\n\306\211\203f@\2119\205\241\310N\211\203	\f
	@	A\211W\204\313\fW\203\320\202
\\\\Y\205\fY\205W\205W\205\314\".\211\203B\202]\204]\315\202]\242\316=\203;\317\f
%\211\203]B\202]:\203I@\307=\203QB\202]\320\f
%BA\211\204\223*\237*\207" [result rowcol formula startrow startcol rowincr nil quote ses-cell string-match "\\`[A-Z]+[0-9]+\\'" symbol-name ses-create-cell-symbol delete ses-range ses-relocate-range ses-relocate-formula colincr sym col row ses--numrows ses--numcols cur --dolist-tail-- ses-relocate-return] 7 (#$ . 40297)])
#@410 Relocate one RANGE, of the form '(ses-range min max).  Cells starting
at (STARTROW,STARTCOL) are being shifted by (ROWINCR,COLINCR).  Result is the
new range, or nil if the entire range is deleted.  If new rows are being added
just beyond the end of a row range, or new columns just beyond a column range,
the new rows/columns will be added to the range.  Sets `ses-relocate-return'
if the range was altered.
(defalias 'ses-relocate-range #[(range startrow startcol rowincr colincr) "\211A@)\2119\205\n\306N\n\f
@A\211\fW\2049
W\203>\202p\\\\\fY\205p
Y\205pW\205pW\205p\307\".\3108\2119\205\202\306N\f
@A\211\fW\204\257
W\203\264\202\346\\\\\fY\205\346
Y\205\346W\205\346W\205\346\307\".\311\204\374\204\374\311\202\304\312!\203d\313\204\307\fA\"\300\204;\314V\203-\307SA\"\202\304\307\fSA\"\300\202\304\314V\203\304@\fSU\203\304AAU\203\304\307\315\f\316#A\"\202\304\317\204v\307@
\"\300\204\236\314V\203\217\307@S\"\202\304\307@
S\"\300\202\304\314V\203\304A
SU\203\304@@U\203\304\307@\315
\316#\"\205!!Z9\205\336\306N!9\205\353\306N!ZU\204\364\300\320AAABBB.\207" [range x minorig minrowcol startrow startcol ses-cell ses-create-cell-symbol 2 nil zerop car 0 + -1 cdr ses-range rowincr colincr rowcol sym col row ses--numrows ses--numcols min maxorig maxrowcol max field ses-relocate-return] 7 (#$ . 41788)])
#@170 Alter all cell values, symbols, formulas, and reference-lists to relocate
the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR
to each symbol.
(defalias 'ses-relocate-all #[(minrow mincol rowincr colincr) "\306\211\306\211\f\307\310\311\307\f#()()W\2037*\307+,+,W\203\306-.(H+H\312\313H/012%(1Z\314(+\315\n$\210-\316=\203c(+BB-\203r\317\320\321(+\"\"\210\312\322H/012%\314(+\323\n$\210(/Y\203+0Y\203.(H+H\307H+2Z3\2114\203\326	\307Y\203\3263\307Y\203\3264\321	3\"=\204\326\3244\325(+B#\210\202\314(+\326\321(+\"\2114$\210\3274!\203\365\3304!\204\3314!\306L\210\3244\325(+B#\210*+T\211+\202%*
(T\211(5\247\203,5@Y\2052\3325\"*\210\202\333
!\210.\306\211\211\211\21136781\307X\2032\307X\203\f/Z\307\310\334\307\f/Z#9(:(:W\203(/\\7*0Z\307+,+,W\203\353+0\\671Z62Z3.7H6H\307H\321	3\";\2114;=\203\341\31476\335	\fW\203\3343*W\203\334.	H3H\307HJ\202\337;J$\210*+T\211+\202\207*9(T\211(5\247\2035@Y\205
\3325\"*\210\202l\3339!\210+\202\351\3361!\203\345\3362!\203\345\fS*S\306\21167<=\f/Z\307\310\334\307\f/Z#>(?(?W\203\333=(Z7*0Z\307+,+,W\203\264<+Z671Z62Z3	/W\204\21730W\203\225\3068\202\241.	H3H\307HJ8\31476\3358$\210+T\211+\202f*>(T\211(5\247\203\3205@Y\205\326\3325\"*\210\202K\333>!\210.\202\351\337\340!\210-\2052\341\342!\210\306\211+(\343 @\203.\344\345\346\"\210\211A@@)(\211A@A)+A\347(+.(H+H\313H#\210\202\374*\341\306!)\207" [reform xrow newval mycell ses--numrows #1=#:--dotimes-temp2-- nil 0 make-progress-reporter "Relocating formulas..." ses-relocate-formula 1 ses-set-cell formula range add-to-list ses--deferred-recalc ses-create-cell-symbol 3 references put ses-cell symbol boundp local-variable-p make-local-variable progress-reporter-do-update progress-reporter-done "Relocating variables..." value wholenump error "ROWINCR and COLINCR must have the same sign" message "Fixing ses-ranges..." float-time ses-time-check "Fixing ses-ranges... (%d left)" (length reform) ses-cell-set-formula row #2=#:--dotimes-temp-- ses--numcols col --dotimes-limit-- ses-relocate-return ses--cells minrow mincol rowincr colincr xcol sym reporter mycol myrow oldval #3=#:--dotimes-temp2-- #4=#:--dotimes-temp-- xsym distx disty #5=#:--dotimes-temp2-- #6=#:--dotimes-temp-- ses-start-time x] 8 (#$ . 43391)])
#@65 For undo, remember point before we start changing hidden stuff.
(defalias 'ses-begin-change #[nil "\301\302\303!\210`S`|)\207" [inhibit-read-only t insert-and-inherit "X"] 2 (#$ . 45912)])
#@60 Like set, but undoable.  Result is t if value has changed.
(defalias 'ses-set-with-undo #[(sym newval) "\303!\205J	\232\205	;??\205/\303!\203#\304\305\211JF\202'\304\306E\nB	L\210\307\207" [sym newval buffer-undo-list boundp apply ses-set-with-undo ses-unset-with-undo t] 4 (#$ . 46108)])
#@43 Set SYM to be unbound.  This is undoable.
(defalias 'ses-unset-with-undo #[(sym) "\302!\205\303\304\211JF	B\305!\207" [sym buffer-undo-list boundp apply ses-set-with-undo makunbound] 4 (#$ . 46417)])
#@64 Like `aset', but undoable.
Result is t if element has changed.
(defalias 'ses-aset-with-undo #[(array idx newval) "	H\n\232?\205\304\305		H\257B	\nI\210\306\207" [array idx newval buffer-undo-list apply ses-aset-with-undo t] 6 (#$ . 46629)])
#@112 Parse the current buffer and set up buffer-local variables.
Does not execute cell formulas or print functions.
(defalias 'ses-load #[nil "~\210db\210\306\307\310\311#\210\312\313!\210\314 \310\315\316\217\317	!\320U\203I	@\247\203I	\211A@)\247\203I	\211A@)\321Y\203I\322	8\247\203I\322	8\321V\204M\323\324!\210	@	\211A@)\322	8\313U\203u\3104\325\326!\210\327c\210\330\303\322\"\210\331\332!\210)\322U\204\323\333!\210\334\f\310\"5\f\3216767W\203\24656\334
\310\"I\2106T\2116\202\215+eb\210\fy\210\3358!\204\270\323\336!\210\313u\210\314 98GSu\210\337\340:\"\210\310;\f\3216767W\2031
\321<7<7W\203\341p!\211\243\242=\335\342!\203\n\242\343=\203\344=6<#\204\323\345!\210\346\n!\210*<T\211<\202\344*\335\347!\204(\323\350!\2106T\2116\202\326*\341p!`f\341p!`f\341p!`f\341p!`f>?@ABCD\211E\242\351=\203\221D\352U\203\221C\242\353=\203\221B\352U\203\221A\242\354=\203\221@\352U\203\221?\242\355=\203\221>\352U\204\225\323\356!\210\346E!\210\346A!\210\346C!\210\346?!\210.\313u\210\335\357\360\361F#!\204\275\323\362!\210\320y\210`G\325\304!\210`GU\206\321\323\363!)\207" [ses--params-marker params x ses--file-format ses--numrows ses--numcols search-backward ";; Local Variables:\n" nil t backward-list 1 point-marker (byte-code "\300p!\207" [read] 2) ((error)) safe-length 3 0 2 error "Invalid SES file" ses-goto-data ses--header-row "(ses-header-row 0)\n" ses-set-parameter message "Upgrading from SES-1 file format" "This file needs a newer version of the SES library code" make-vector looking-at "Missing marker between print and data areas" mapc ses-printer-record read "\n" ses-cell ses-create-cell-variable "Cell-def error" eval "\n\n" "Missing blank line between rows" ses-column-widths 10 ses-column-printers ses-default-printer ses-header-row "Invalid SES global parameters" replace-regexp-in-string "1" "[0-9]+" "Problem with column-defs or global-params" "Extraneous newlines someplace?" buffer-undo-list ses--cells row --dotimes-limit-- ses-print-data-boundary ses--data-marker ses-standard-printer-functions ses--symbolic-formulas col sym n4 head-row n3 def-printer n2 printers n1 widths ses-initial-global-parameters start] 9 (#$ . 46887)])
#@193 Set up for display of only the printed cell values.

Narrows the buffer to show only the print area.  Gives it `read-only' and
`intangible' properties.  Sets up highlighting for current cell.
(defalias 'ses-setup #[nil "e\306\211\307 \310\211\311\312\211\"\210\313`d\310#\210\314\315\316ed\"\"\210\317e`S\320\321$\210\317e`S\322\323$\210\317eeT\324\306$\210%\312\325\326\312%#&'('(W\203\367)\312*+*+W\203\320
,'H*H\312H*)SW\203\230,'H*TH\312HJ\327=\203\230\330
-*H\331#*T\211*\202m\212	b\210\332\330i
	Z-*H#!\210l\203\272\330
-*H\331#\202\276\310u\210`)\317	
\333$\210*T\211*\202X*&'T\211'./.\247\203\354./@Y\205\362\334/.\"*\210\202G\335&!\210+\n\204\336\310!\210\337 \210\340 \210.\341eTeT\"0\3420\343\344#\207" [sym pos was-modified inhibit-point-motion-hooks inhibit-read-only end t buffer-modified-p nil ses-goto-data 0 set-text-properties mapc delete-overlay overlays-in put-text-property read-only ses keymap ses-mode-print-map front-sticky make-progress-reporter "Finding cells..." *skip* + 1 move-to-column intangible progress-reporter-do-update progress-reporter-done restore-buffer-modified-p buffer-disable-undo buffer-enable-undo make-overlay overlay-put face underline ses--numrows #1=#:--dotimes-temp2-- row #2=#:--dotimes-temp-- ses--numcols col --dotimes-limit-- ses--cells ses--col-widths value reporter ses--curcell-overlay] 7 (#$ . 49142) nil])
#@114 Cleanup when changing a buffer from SES mode to something else.
Delete overlays, remove special text properties.
(defalias 'ses-cleanup #[nil "~\210\303\304\305 \306ed\304#\210\307\310\311ed\"\"\210?\205\312\304!+\207" [was-modified buffer-file-name inhibit-read-only t nil buffer-modified-p set-text-properties mapc delete-overlay overlays-in restore-buffer-modified-p] 5 (#$ . 50582)])
#@331 Major mode for Simple Emacs Spreadsheet.
See "ses-example.ses" (in `data-directory') for more info.

Key definitions:
\{ses-mode-map}
These key definitions are active only in the print area (the visible part):
\{ses-mode-print-map}
These are active only in the minibuffer, when entering or editing a formula:
\{ses-mode-edit-map}
(defalias 'ses-mode #[nil "\306\300!\205	\307=?\205\275\310 \210\311 \210\307\312\313\314\313\314(\313)\315\316\317\313\314$\210\315\320\317\313\314$\210\321*\322\323 !\324 +,\212,\203H-c\210\325 \210\326 \210),\203\245./\232\204a\327.!\21001\330HU\204q\331\3300\"\210\332 \2102@3V\203\204\3332@S!\2102A4V\203\224\3342AS!\210\335 \210\336+!\210\337 \210\340 \210eb\210*\3415!\210\307\315\342\343\313\314$\210\344\345\313\343#\210\346\347!\207" [ses--deferred-narrow major-mode mode-name next-line-add-newlines truncate-lines show-trailing-whitespace boundp ses-mode kill-all-local-variables ses-set-localvars "SES" nil t add-hook change-major-mode-hook ses-cleanup before-revert-hook (:eval (progn (when (/= (window-hscroll) ses--header-hscroll) (setq ses--header-hscroll (window-hscroll)) (ses-create-header-string)) ses--header-string)) zerop buffer-size buffer-modified-p ses-load ses-setup ses-read-default-printer 0 ses-set-column-width ses-set-curcell ses-insert-row ses-insert-column ses-write-cells restore-buffer-modified-p buffer-disable-undo buffer-enable-undo use-local-map post-command-hook ses-command-hook run-with-idle-timer 0.01 run-mode-hooks ses-mode-hook transient-mark-mode indent-tabs-mode header-line-format was-modified was-empty ses-initial-file-contents ses-initial-default-printer ses--default-printer ses-initial-column-width ses--col-widths ses-initial-size ses--numrows ses--numcols ses-mode-map] 5 (#$ . 50983) nil])
(put 'ses-mode 'mode-class 'special)
#@245 Invoked from `post-command-hook'.  If point has moved to a different cell,
moves the underlining overlay.  Performs any recalculations or cell-data
writes that have been deferred.  If buffer-narrowing has been deferred,
narrows the buffer now.
(defalias 'ses-command-hook #[nil "\300\301\302\217\210\303\207" [err (byte-code "\306=\203\230	\203\307 \210	\310\311\n!\210)\203!\312 \210\313\fB
\203,e}\210\310\314 \210=\204i\204F\310\202f:\204W\315\316!D\202f\317\316@!\320\316A!F\321 \210)<\203z\322\323\211#\210\202\212\324`\325\" \322` S#\210)\326 \204\230\327\330\310\331#\210\332\310\207" [major-mode ses--deferred-recalc old ses--deferred-write buffer-undo-list ses--deferred-narrow ses-mode ses-initialize-Dijkstra-attempt nil ses-update-cells ses-write-cells (apply ses-widen) ses-set-curcell " cell " symbol-name " range " "-" force-mode-line-update move-overlay 2 next-single-property-change intangible pos-visible-in-window-p run-with-idle-timer 0.01 ses-command-hook t ses--data-marker ses--curcell oldcell mode-line-process ses--curcell-overlay next] 5) ((error (byte-code "\204\302 \210\303\304\305	!\"\207" [executing-kbd-macro err ding message "%s" error-message-string] 4))) nil] 3 (#$ . 52842)])
#@125 Set up `ses--header-string' as the buffer's header line.
Based on the current set of columns and `window-hscroll' position.
(defalias 'ses-create-header-string #[nil "\306 [\307\211\211\310\311\312\313#\nB\f\314
W\203\235
H\315	\316#\211\316U\2033\311\nB\316V\203\226\314V\203m\212\317S
\"\210\320``	\\\"\321\322\"\203\\\314\211\224OGY\203i\314TO)\202q\323
!\310\324 #\nB\310\325\312\326\327SEC\324 %\nB\310\311\312\326\327EC#\nB
T\211\202*\314V\203\261\310\330\331\"\312\332#\nB\333\334\n\237\"\211!,\207" [x width result totwidth ses--numcols col window-hscroll nil propertize " " display ((space :align-to 0)) 0 + 1 ses-goto-print buffer-substring-no-properties string-match "[ 	]+\\'" ses-column-letter face "." space :align-to format "  [row %d]" ((height (- 1))) apply concat --dotimes-limit-- ses--col-widths ses--header-row ses-box-prop ses--header-string] 7 (#$ . 54119)])
#@25 Move point to cell SYM.
(defalias 'ses-jump #[(sym) "9\205\302N\211\204\303\304!\210J\305=\203\303\306!\210\307	@	A\")\207" [sym rowcol ses-cell error "Invalid cell name" *skip* "Cell is covered by preceding cell" ses-goto-print] 4 (#$ . 55063) "SJump to cell: "])
#@48 Like `ses-jump', but no error if invalid cell.
(defalias 'ses-jump-safe #[(cell) "\300\301\302\217\207" [nil (ses-jump cell) ((error))] 3 (#$ . 55344)])
#@101 Recreate the display area.  Calls all printer functions.  Narrows to
print area if NONARROW is nil.
(defalias 'ses-reprint-all #[(&optional nonarrow) "~\210\204\306\307`\310\"\306\311 \210eb\210\312\f!\210\fG[u\210e`|\210
\313W\203>\314!\210T\211\202**
\313\315\316\313
#W\203\265H\313H\313HJ\317=\203k\320\313\321\322$\210\313  W\203\212\323 \"\210 T\211 \202t*\324\325!\210T\211!\247\203\252!@Y\205\260\326!\"*\210\202L\327!\210+\330!*\207" [nonarrow ses--deferred-narrow inhibit-read-only startcell ses-print-data-boundary ses--numrows t get-text-property intangible ses-begin-change search-forward 0 insert-and-inherit make-progress-reporter "Reprinting..." *skip* ses-set-cell value nil ses-print-cell beginning-of-line 2 progress-reporter-do-update progress-reporter-done ses-jump-safe row --dotimes-limit-- ses--blank-line #1=#:--dotimes-temp2-- #2=#:--dotimes-temp-- ses--cells ses--numcols col reporter] 7 (#$ . 55504) "*P"])
(defalias 'ses-initialize-Dijkstra-attempt #[nil "T	\n_\211\207" [ses--Dijkstra-attempt-nb ses--numrows ses--numcols ses--Dijkstra-weight-bound] 2])
#@298 Recalculate and reprint the current cell or range.

For an individual cell, shows the error if the formula or printer
signals one, or otherwise shows the cell's complete value.  For a range, the
cells are recalculated in "natural" order, so cells that other cells refer
to are recalculated first.
(defalias 'ses-recalculate-cell #[nil "\306\307!\210\310 \210\311 \210\312\211\313 :\204I9\205\314N\315\316\f\317B
@HAH#\210\320@A\321#\211\203	
@HAH\317HC\244\210\202\211#:\203W#@\202Y#9\205m#:\203i#@\202k#\314N$#:\203{#A\202}#9\205\221#:\203\215#A\202\217#\314N%$@%@$A%A\312\211&'()*\211+*V\204\274)(V\203\300\322\323!\210\324*+\325#\317,-,-W\203,+\\'\324()\325#\317.-.-W\203	.)\\&\326\327\330\"\210\312\331\332\217\210.T\211.\202\351*,T\211,\202\316./0\312/\333\334\335\217\210)	\203/\336\337\340	!\"\202>:\203:\336\341!\202>\342J!*\207" [cur-rowcol sig ses-start-time ses--curcell ses--Dijkstra-attempt-nb ses--cells ses-check-curcell range ses-begin-change ses-initialize-Dijkstra-attempt nil float-time ses-cell ses-cell-property-set-fun :ses-Dijkstra-attempt 0 ses-calculate-cell t error "Empty range" - -1 ses-time-check "Recalculating... %s" (ses-cell-symbol row col) (byte-code "\305	H\nH\306H\307\"\210\310\311\312B	H\nH#\210\313	\n\307#\211\203,\f	H\nH\312HC\244\210\305\207" [ses--cells row col ses--Dijkstra-attempt-nb sig ses-formula-references 1 t ses-cell-property-set-fun :ses-Dijkstra-attempt 0 ses-calculate-cell] 5) ((wrong-type-argument (byte-code "\303\304	H\nH\305H\"\207" [ses--cells row col add-to-list ses--deferred-recalc 0] 4))) hold (ses-update-cells x t) ((error (byte-code "\302\207" [hold sig nil] 1))) message "%s" error-message-string " " princ #1=#:cur #2=#:min #3=#:max col row maxcol mincol maxrow minrow #4=#:r --dotimes-limit-- #5=#:c ses--deferred-recalc x] 7 (#$ . 56676) "*"])
#@36 Recalculate and reprint all cells.
(defalias 'ses-recalculate-all #[nil "\305`\306\"\307	SH\nSH\310HB\311 \210\312\f!*\207" [ses--cells ses--numrows ses--numcols ses--curcell startcell get-text-property intangible A1 0 ses-recalculate-cell ses-jump-safe] 4 (#$ . 58606) "*"])
#@77 Reprint current cell, but without spillover into any following blank cells.
(defalias 'ses-truncate-cell #[nil "\306 \2109\205\307N\211@	A\211\fSW\205F
\nHTH\310HJ\311=\205F\312\313
\nHTH\310H\314BC\315BB!\210\316\nT\317\320$\210\321\nT\"+\207" [ses--curcell rowcol row col ses--numcols ses--cells ses-check-curcell ses-cell 0 *skip* eval let (t) ((ses-print-cell row col)) ses-set-cell value nil ses-print-cell] 6 (#$ . 58891) "*"])
#@66 Reconstruct buffer based on cell data stored in Emacs variables.
(defalias 'ses-reconstruct-all #[nil "\306 \210\307\211\211\310\311\312\310#$
$W\203_!\310%&%&W\203;\313
%\314\307$\210%T\211%\202$*\f
T\211'('\247\203T'(@Y\205Z\315('\"*\210\202\316\f!\210+\310\311\317\310#)*
*W\203\377!\310%&%&W\203\332\320+
H%H\321H!\307,\211-\203\320-@\211,9\205\250,\322N\211@\nA\313	\314+
H%H\310H+	HH\323HB$\210-A\211-\204\232*%T\211%\202\200*)
T\211'('\247\203\364'(@Y\205\372\315('\"*\210\202p\316)!\210.\324 \210\325.db\210\326\327\307\325#\203e`|\210\202)ed|\210/c\210eb\210\310&
&W\203@0c\210
T\211\202/*1c\2101GS[u\210\330 21GSu\210\331!T_\332\"c\210\333c\2103c\2103GS[u\210\330 43GSu\210)\334\335\"\210\334\336\"\210\334\337\"\210\334\340 \"\210\334\303\"\210\334\341!\"\210\342 \210\343 \210eb\207" [ycol yrow x ses--numrows #1=#:--dotimes-temp2-- row ses-begin-change nil 0 make-progress-reporter "Deleting references..." ses-set-cell references progress-reporter-do-update progress-reporter-done "Computing references..." ses-formula-references 1 ses-cell 3 ses-widen t search-backward ";; Local Variables:\n" point-marker make-string 10 "\n\n\n\n" ses-set-parameter ses--col-widths ses--col-printers ses--default-printer ses--header-row ses--numcols ses-setup ses-recalculate-all #2=#:--dotimes-temp-- col --dotimes-limit-- value reporter #3=#:--dotimes-temp2-- #4=#:--dotimes-temp-- ses--cells ref --dolist-tail-- inhibit-read-only ses-initial-file-trailer ses--blank-line ses-print-data-boundary ses--data-marker ses-initial-global-parameters ses--params-marker] 8 (#$ . 59344) "*"])
#@131 Display current cell contents in minibuffer, for editing.  Returns nil if
cell formula was unsafe and user declined confirmation.
(defalias 'ses-edit-cell #[(row col newval) "\303\304\"\205\305 \210\306	\n#\210\307\207" [newval row col ses-warn-unsafe unsafep ses-begin-change ses-cell-set-formula t] 4 (#$ . 61051) (progn (barf-if-buffer-read-only) (ses-check-curcell) (let* ((rowcol (and (symbolp ses--curcell) (get ses--curcell 'ses-cell))) (row (car rowcol)) (col (cdr rowcol)) (formula (aref (aref (aref ses--cells row) col) 1)) initial) (if (eq (car-safe formula) 'ses-safe-formula) (setq formula (cadr formula))) (if (eq (car-safe formula) 'quote) (setq initial (format "'%S" (cadr formula))) (setq initial (prin1-to-string formula))) (if (stringp formula) (setq initial (cons initial (length initial)))) (list row col (read-from-minibuffer (format "Cell %s: " ses--curcell) initial ses-mode-edit-map t 'ses-read-cell-history))))])
#@53 Self-insert for initial character of cell function.
(defalias 'ses-read-cell #[(row col newval) "\306	\n#\205#\307 \210\310\211\205\"
@\211\311!\210
A\211\204\310*\207" [row col newval ses-after-entry-functions x --dolist-tail-- ses-edit-cell ses-command-hook nil 1] 5 (#$ . 62000) (let* ((initial (this-command-keys)) (rowcol (progn (ses-check-curcell) (and (symbolp ses--curcell) (get ses--curcell 'ses-cell)))) (curval (aref (aref (aref ses--cells (car rowcol)) (cdr rowcol)) 1))) (barf-if-buffer-read-only) (list (car rowcol) (cdr rowcol) (read-from-minibuffer (format "Cell %s: " ses--curcell) (cons (if (equal initial "\"") "\"\"" (if (equal initial "(") "()" initial)) 2) ses-mode-edit-map t 'ses-read-cell-history (prin1-to-string (if (eq (car-safe curval) 'ses-safe-formula) (cadr curval) curval)))))])
#@151 Self-insert for a symbol as a cell formula.  The set of all symbols that
have been used as formulas in this spreadsheet is available for completions.
(defalias 'ses-read-symbol #[(row col symb) "\306	\n#\205#\307 \210\310\211\205\"
@\211\311!\210
A\211\204\310*\207" [row col symb ses-after-entry-functions x --dolist-tail-- ses-edit-cell ses-command-hook nil 1] 5 (#$ . 62829) (let ((rowcol (progn (ses-check-curcell) (and (symbolp ses--curcell) (get ses--curcell 'ses-cell)))) newval) (barf-if-buffer-read-only) (setq newval (completing-read (format "Cell %s ': " ses--curcell) ses--symbolic-formulas)) (list (car rowcol) (cdr rowcol) (if (string= newval "") nil (list 'quote (intern newval)))))])
#@109 Delete formula and printer for current cell and then move to next cell.
With prefix, deletes several cells.
(defalias 'ses-clear-cell-forward #[(count) "\305W\203\306[!\207\307 \210\310 \210\305	\nW\205B\311 \2109\205&\312N\211\2040\313\314\315\"\210\316\f@\fA\"\210)\317u\210	T\211\202*\207" [count x --dotimes-limit-- ses--curcell rowcol 0 ses-clear-cell-backward ses-check-curcell ses-begin-change ses-set-curcell ses-cell signal end-of-buffer nil ses-clear-cell 1] 4 (#$ . 63546) "*p"])
#@80 Move to previous cell and then delete it.  With prefix, deletes several
cells.
(defalias 'ses-clear-cell-backward #[(count) "\305W\203\306[!\207\307\310!\210\311 \210\305	\nW\205:\312u\210\313 \2109\205*\314N\315\f@\fA\"\210)	T\211\202*\207" [count x --dotimes-limit-- ses--curcell rowcol 0 ses-clear-cell-forward ses-check-curcell end ses-begin-change -1 ses-set-curcell ses-cell ses-clear-cell] 4 (#$ . 64059) "*p"])
#@170 Common code for `ses-read-cell-printer', `ses-read-column-printer', and `ses-read-default-printer'.
PROMPT should end with ": ".  Result is t if operation was canceled.
(defalias 'ses-read-printer #[(prompt default) "\304 \210\305=\203\306\202\307\310	\311\312O#\313	\314\n\305\315\316!&\211\232\203.\305\202J\317!\210\203J;\204J\242;\204J\320\321\"\204J\305)\207" [default prompt ses-mode-edit-map new barf-if-buffer-read-only t "" format "%s [currently %S]: " 0 -2 read-from-minibuffer nil ses-read-printer-history prin1-to-string ses-printer-validate ses-warn-unsafe unsafep-function] 9 (#$ . 64500)])
#@499 Set the printer function for the current cell or range.

A printer function is either a string (a format control-string with one
%-sequence -- result from format will be right-justified), or a list of one
string (result from format will be left-justified), or a lambda-expression of
one argument, or a symbol that names a function of one argument.  In the
latter two cases, the function's result should be either a string (will be
right-justified) or a list of one string (will be left-justified).
(defalias 'ses-read-cell-printer #[(newval) "\306=?\205\306\307 \210	\211:\203\n@\202\n9\205(\n:\203%\n@\202&\n\310N\n:\2033\nA\2024\n9\205E\n:\203B\nA\202C\n\310N@\f@A\fA\311\211\211V\204jV\203n\312\313!\210\314\315#\316W\205\304\\\314\315#\316W\203\272\\\317
\320$\210\321
\"\210T\211\202\227*T\211\202|.\207" [newval ses--curcell #1=#:cur #2=#:min #3=#:max col t ses-begin-change ses-cell nil error "Empty range" - -1 0 ses-set-cell printer ses-print-cell row maxcol mincol maxrow minrow #4=#:r --dotimes-limit-- #5=#:c] 7 (#$ . 65138) (let ((default t) x) (ses-check-curcell 'range) (catch 'ses-read-cell-printer (let* ((#6=#:cur ses--curcell) (#7=#:min (and (symbolp #8=(if (consp #6#) (car #6#) #6#)) (get #8# . #11=('ses-cell)))) (#9=#:max (and (symbolp #10=(if (consp #6#) (cdr #6#) #6#)) (get #10# . #11#)))) (let ((minrow (car #7#)) (maxrow (car #9#)) (mincol (cdr #7#)) (maxcol (cdr #9#)) row col) (if (or (> minrow maxrow) (> mincol maxcol)) (error "Empty range")) (let ((--dotimes-limit-- (- maxrow minrow -1)) (#12=#:r 0)) (while (< #12# --dotimes-limit--) (setq row (+ #12# minrow)) (let ((--dotimes-limit-- (- maxcol mincol -1)) (#13=#:c 0)) (while (< #13# --dotimes-limit--) (setq col (+ #13# mincol)) (setq x (aref (aref (aref ses--cells row) col) 2)) (if (eq (car-safe x) 'ses-safe-printer) (setq x (cadr x))) (if (eq default t) (setq default x) (if (equal default x) nil (setq default t) (throw 'ses-read-cell-printer t))) (setq #13# (1+ #13#)))) (setq #12# (1+ #12#))))))) (list (ses-read-printer (format "Cell %S printer: " ses--curcell) default)))])
#@95 Set the printer function for the current column.
See `ses-read-cell-printer' for input forms.
(defalias 'ses-read-column-printer #[(col newval) "\305=?\205(\306 \210\307\310	#\210\212\n\311\fW\205'\312	\"\210T\211\202+\207" [newval col ses--numrows row --dotimes-limit-- t ses-begin-change ses-set-parameter ses--col-printers 0 ses-print-cell] 5 (#$ . 67306) (let ((col (cdr (and (symbolp ses--curcell) (get ses--curcell 'ses-cell))))) (ses-check-curcell) (list col (ses-read-printer (format "Column %s printer: " (ses-column-letter col)) (aref ses--col-printers col))))])
#@109 Set the default printer function for cells that have no other.
See `ses-read-cell-printer' for input forms.
(defalias 'ses-read-default-printer #[(newval) "\301=?\205\302 \210\303\304\"\210\305\301!\207" [newval t ses-begin-change ses-set-parameter ses--default-printer ses-reprint-all] 3 (#$ . 67898) (list (ses-read-printer "Default printer: " ses--default-printer))])
#@93 Insert a new row before the current one.
With prefix, insert COUNT rows before current one.
(defalias 'ses-insert-row #[(count) "\306\307!\210\310V\204\311\312\313\"\210\314 \210\315\211	9\205	\316N@\206!\n\313+\317\n\320\n\321#\310,S$\210\322\302\n\\\"\210\323\f\310\"\210\310\324\325\310#-././W\203\325\326,\313\",\3100101W\203\2240\313\211\211\211\21123456\32765432%-I\2100T\2110\202d*\330\f#\331\332\333\f\334BBBB7B78c\210-.T\211.9:9\247\203\3129:@Y\205\320\335:9\"*\210\202M\336-!\210+\337\f\310\"\210\340,T_\341\"c\210\342\f\310\310$\210\343\344;\313#\344<!=\211>G\310V\204=G\310V\203H\310.1.1W\203G,\3100101W\203=\345.\f\\0\"\2100T\2110\202%*.T\211.\202**&\fV\203[\322\346&\\\"\210\347 \210,\350 \210\3517B7	\203m\352	!\207\323\nS\310\"\207" [count ses--curcell ses--numrows newrow row inhibit-read-only ses-check-curcell end 0 signal args-out-of-range nil ses-begin-change t ses-cell ses-create-cell-variable-range + -1 ses-set-parameter ses-goto-print make-progress-reporter "Inserting row..." make-vector vector ses-vector-insert apply ses-vector-delete ses--cells (1) progress-reporter-do-update progress-reporter-done ses-goto-data make-string 10 ses-relocate-all mapconcat ses-call-printer ses-print-cell ses--header-row ses-reset-header-string ses-setup (apply ses-widen) ses-jump-safe inhibit-quit ses--numcols #1=#:--dotimes-temp2-- x #2=#:--dotimes-temp-- col --dotimes-limit-- property-list references printer formula symbol buffer-undo-list ses--blank-line value reporter ses--col-printers ses--default-printer global cols] 9 (#$ . 68279) "*p"])
#@88 Delete the current row.
With prefix, deletes COUNT rows starting from the current one.
(defalias 'ses-delete-row #[(count) "\306 \210\307V\204\310\311\312\"\210\313\211	9\205	\314N@
\nZ^\315 \210\316\305
Z\"\210\317\n\307\"\210\320!\210\321\n\307\"\210\320T_!\210\322\323\324\n#\"\210\325\n\307[\307$\210\326
\327
\330#\307S$\210\nV\203\204\n\\X\203y\316\331\307\"\210\202\201\316\331Z\"\210\332 \210+\333 \210\334B\335	!\207" [count ses--curcell row inhibit-read-only inhibit-quit ses--numrows ses-check-curcell 0 signal args-out-of-range nil t ses-cell ses-begin-change ses-set-parameter ses-goto-print ses-delete-line ses-goto-data ses-set-with-undo ses--cells ses-vector-delete ses-relocate-all ses-destroy-cell-variable-range + -1 ses--header-row ses-reset-header-string ses-setup (apply ses-widen) ses-jump-safe ses--numcols buffer-undo-list] 6 (#$ . 69955) "*p"])
#@242 Insert a new column before COL (default is the current one).
With prefix, insert COUNT columns before current one.
If COL is specified, the new column(s) get the specified WIDTH and PRINTER
(otherwise they're taken from the current column).
(defalias 'ses-insert-column #[(count &optional col width printer) "\306 \210\307V\204\310\311\312\"\210	\204%\n9\205\n\313NA	H
	H%\314 \210\315\211
\312&'()*\316\307+S\317\320#$\210\307\321\322\307#,-.-.W\203\323	\fT\"\210\324\325T\"\210+\307/0/0W\203\316	TW\203\2211/H	H\307HJ\326=\203\221\315&\3271/\3301/H	\312\211\211\211\21123%45\33154%32%-##\210\332/	\"\210\333c\210/T\211/\202q*\330(	\f#(\330'	%#',-T\211-676\247\203\37367@Y\205\33476\"*\210\202S\335,!\210+\324\303(\"\210\324\305'\"\210\336 \210\337\307	\307$\210&\203.\340\315!\210\202\341%!G\307V\204B\3418!G\307V\203|+\307-0-0W\203{\3079090W\203q\342-9	\\\"\2109T\2119\202Y*-T\211-\202K*\343 \210-\344\n!\207" [count col ses--curcell ses--col-widths width ses--col-printers ses-check-curcell 0 signal args-out-of-range nil ses-cell ses-begin-change t ses-create-cell-variable-range + -1 make-progress-reporter "Inserting column..." ses-adjust-print-width ses-set-parameter ses--numcols *skip* ses-aset-with-undo ses-vector-insert vector ses-goto-data 10 progress-reporter-do-update progress-reporter-done ses-reset-header-string ses-relocate-all ses-reprint-all ses-call-printer ses-print-cell-new-width ses-setup ses-jump-safe printer has-skip printers widths inhibit-read-only inhibit-quit ses--numrows #1=#:--dotimes-temp2-- x #2=#:--dotimes-temp-- row --dotimes-limit-- ses--cells property-list references formula symbol value reporter ses--default-printer y] 13 (#$ . 70870) "*p"])
#@94 Delete the current column.
With prefix, deletes COUNT columns starting from the current one.
(defalias 'ses-delete-column #[(count) "\306 \210\307V\204\310\311\312\"\210\313\211	9\205	\314N\307\312\211\211'()'@'A\fZ^\211U\203@\315\316!\210\307*+*+W\203c\317
\f*\\H\320#*T\211*\202H*\321 \210\322\323Z\"\210\324\f
[\"\210,\307\325\326\307,#-././W\203\365\327.\f\"\210\330!\2100.H\fH\307HJ\331=\204\275\fW\203\2770.H\f\\H\307HJ\331=\203\277\313\3320.\3330.H\f##\210-.T\211.121\247\203\35212@Y\205\360\33421\"*\210\202\204\335-!\210+\322\336\333\f#\"\210\322\337\333\f#\"\210\340 \210\341\307\f\307[$\210\342\307,S\317\343#$\210\n\2034\344\313!\210\2027\345 \210\fY\203A\fS\346\f\".\207" [count ses--curcell has-skip origrow col width ses-check-curcell 0 signal args-out-of-range nil t ses-cell error "Can't delete all columns!" + 1 ses-begin-change ses-set-parameter ses--numcols ses-adjust-print-width make-progress-reporter "Deleting column..." ses-goto-data ses-delete-line *skip* ses-aset-with-undo ses-vector-delete progress-reporter-do-update progress-reporter-done ses--col-widths ses--col-printers ses-reset-header-string ses-relocate-all ses-destroy-cell-variable-range -1 ses-reprint-all ses-setup ses-goto-print rowcol inhibit-read-only inhibit-quit x --dotimes-limit-- ses--numrows #1=#:--dotimes-temp2-- row #2=#:--dotimes-temp-- ses--cells value reporter] 9 (#$ . 72681) "*p"])
#@143 Move to next cell in row, or inserts a new cell if already in last one, or
inserts a new row if at bottom of print area.  Repeat COUNT times.
(defalias 'ses-forward-or-insert #[(&optional count) "\306\307!\210\310	\311\nW\205T\312 \210\f\204!\313 \210\314\315!\210\202J\f9\205)\f\316NA\317`\320\"Sf\321U\204I\313 \210\322	\nZ
H
H$\210)\323u\210\nT\211\202*\207" [deactivate-mark count x --dotimes-limit-- ses--curcell col ses-check-curcell end t 0 ses-set-curcell barf-if-buffer-read-only ses-insert-row 1 ses-cell next-single-property-change intangible 32 ses-insert-column nil ses--numcols ses--col-widths ses--col-printers] 7 (#$ . 74178) "p"])
#@66 Insert a new row after current one and jump to its first column.
(defalias 'ses-append-row-jump-first-column #[nil "\300 \210\301 \210\302\303!\210\304 \210\305\306!\207" [ses-check-curcell ses-begin-change beginning-of-line 2 ses-set-curcell ses-insert-row 1] 2 (#$ . 74851) "*"])
#@38 Set the width of the current column.
(defalias 'ses-set-column-width #[(col newwidth) "\306W\203\n\307\310!\210\311 \210\312 \210\212\313\314\n\nHZ\"\210\315\303\n#\210)\f\316
W\205;\317
\n\"\210
T\211\202)+\207" [newwidth inhibit-quit col ses--col-widths ses--numrows row 1 error "Invalid column width" ses-begin-change ses-reset-header-string t ses-adjust-print-width ses-set-parameter 0 ses-print-cell-new-width --dotimes-limit--] 6 (#$ . 75139) (let ((col (cdr (progn (ses-check-curcell) (and (symbolp ses--curcell) (get ses--curcell 'ses-cell)))))) (barf-if-buffer-read-only) (list col (if current-prefix-arg (prefix-numeric-value current-prefix-arg) (read-from-minibuffer (format "Column %s width [currently %d]: " (ses-column-letter col) (aref ses--col-widths col)) nil nil t nil (number-to-string (aref ses--col-widths col))))))])
(byte-code "\300\301\302\303\304$\210\305\301\306\307\310B#\210\311\301\304\"\207" [ad-add-advice copy-region-as-kill (ses-copy-region-as-kill nil t (advice lambda nil "It doesn't make sense to copy read-only or intangible attributes into the\nkill ring.  It probably doesn't make sense to copy keymap properties.\nWe'll assume copying front-sticky properties doesn't make sense, either.\n\nThis advice also includes some SES-specific code because otherwise it's too\nhard to override how mouse-1 works." (when (> beg end) (let ((temp beg)) (setq beg end end temp))) (if (not (and (eq major-mode 'ses-mode) (eq (get-text-property beg 'read-only) 'ses) (eq (get-text-property (1- end) 'read-only) 'ses))) ad-do-it (kill-new (ses-copy-region beg end)) (if transient-mark-mode (setq deactivate-mark t)) nil))) around nil ad-set-advice-info-field cache #[(beg end) "\306	\nV\203	\n)\f\307=\203(\310	\311\"\312=\203(\310\nS\311\"\312=\2040\313	\n\"\202>\314\315	\n\"!\210
\203>\316)\207" [ad-return-value beg end temp major-mode transient-mark-mode nil ses-mode get-text-property read-only ses ad-Orig-copy-region-as-kill kill-new ses-copy-region t deactivate-mark] 4 #("Advice doc string" 0 17 (ad-advice-info copy-region-as-kill)) "r"] (nil (ses-copy-region-as-kill) nil function t t) ad-activate] 5)
#@149 Treat the region as rectangular.  Convert the intangible attributes to
SES attributes recording the contents of the cell as of the time of copying.
(defalias 'ses-copy-region #[(beg end) "	U\203		S\305\306\307\310S\"\311#\312\313\fG\314\f$\210\f*\207" [end ses--data-marker inhibit-point-motion-hooks beg x t mapconcat ses-copy-region-helper extract-rectangle "\n" remove-text-properties 0 (read-only t intangible t keymap t front-sticky t)] 5 (#$ . 77313)])
#@179 Converts one line (of a rectangle being extracted from a spreadsheet) to
external form by attaching to each print cell a 'ses attribute that records
the corresponding data cell.
(defalias 'ses-copy-region-helper #[(line) "G\306V\204\307\310!\210\311\312\313\211\211\211
\203V\314
\315#\316
\315#\n9\2050\n\317N	@H	AH\320
\206BG\321\f\312H\f\306H\f\322HE%\210\211\204.\207" [line rowcol sym next mycell pos 1 error "Empty range" t 0 nil get-text-property intangible next-single-property-change ses-cell put-text-property ses 2 inhibit-read-only ses--cells] 9 (#$ . 77786)])
#@103 Generic override for any commands that kill text.
We clear the killed cells instead of deleting them.
(defalias 'ses-kill-override #[(beg end) "\306\307!\210\310\311\312\313\217\210)\314 \210\315 \210	\211:\203\n@\202\n9\2050\n:\203-\n@\202.\n\316N\n:\203;\nA\202<\n9\205M\n:\203J\nA\202K\n\316N@\f@A\fA\317\211\211V\204rV\203v\320\321!\210\322\323#\324W\203\304\\\322\323#\324W\203\272\\\325
\"\210T\211\202\237*T\211\202\204.\326	@!\207" [buffer-read-only ses--curcell #1=#:cur #2=#:min #3=#:max col ses-check-curcell needrange t x (byte-code "\302\303 \304 \"	\"\207" [beg end lookup-key current-global-map this-command-keys] 3) ((buffer-read-only)) barf-if-buffer-read-only ses-begin-change ses-cell nil error "Empty range" - -1 0 ses-clear-cell ses-jump row maxcol mincol maxrow minrow #4=#:r --dotimes-limit-- #5=#:c] 7 (#$ . 78396) "r"])
(byte-code "\300\301\302\303\304$\210\305\301\306\307\310B#\210\311\301\304\"\207" [ad-add-advice yank (ses-yank nil t (advice lambda nil "In SES mode, the yanked text is inserted as cells.\n\nIf the text contains 'ses attributes (meaning it went to the kill-ring from a\nSES buffer), the formulas and print functions are restored for the cells.  If\nthe text contains tabs, this is an insertion of tab-separated formulas.\nOtherwise the text is inserted as the formula for the current cell.\n\nWhen inserting cells, the formulas are usually relocated to keep the same\nrelative references to neighboring cells.  This is best if the formulas\ngenerally refer to other cells within the yanked text.  You can use the C-u\nprefix to specify insertion without relocation, which is best when the\nformulas refer to cells outside the yanked text.\n\nWhen inserting formulas, the text is treated as a string constant if it doesn't\nmake sense as a sexp or would otherwise be considered a symbol.  Use 'sym to\nexplicitly insert a symbol, or use the C-u prefix to treat all unmarked words\nas symbols." (if (not (and (eq major-mode 'ses-mode) (eq (get-text-property (point) 'keymap) 'ses-mode-print-map))) ad-do-it (ses-check-curcell 'end) (push-mark (point)) (let ((text (current-kill (cond ((listp arg) 0) ((eq arg '-) -1) (t (1- arg)))))) (or (ses-yank-cells text arg) (ses-yank-tsf text arg) (ses-yank-one (ses-yank-resize 1 1) text 0 (if (memq (aref text (1- (length text))) '(9 10)) (1- (length text))) arg))) (if (consp arg) (exchange-point-and-mark))))) around nil ad-set-advice-info-field cache #[(&optional arg) "\304	\305=\203\306`\307\"\310=\204\311\n!\202f\312\313!\210\314`!\210\315\n<\203*\316\2026\n\317=\2034\320\2026\nS!\321\n\"\204]\322\n\"\204]\323\324\325\211\"\316\211GSH\326>\205ZGS\n%\210)\n:\203f\327 \210)\207" [ad-return-value major-mode arg text nil ses-mode get-text-property keymap ses-mode-print-map ad-Orig-yank ses-check-curcell end push-mark current-kill 0 - -1 ses-yank-cells ses-yank-tsf ses-yank-one ses-yank-resize 1 (9 10) exchange-point-and-mark] 6 #("Advice doc string" 0 17 (ad-advice-info yank)) "*P"] (nil (ses-yank) nil function t t) ad-activate] 5)
#@361 Replace just-yanked stretch of killed text with a different stretch.
This command is allowed only immediately after a `yank' or a `yank-pop',
when the region contains a stretch of reinserted previously-killed text.
We replace it with a different stretch of killed text.
  Unlike standard `yank-pop', this function uses `undo' to delete the
previous insertion.
(defalias 'ses-yank-pop #[(arg) "\303=\204\n\304\305!\210\306 \210\307 \210\303	\206\310T!\210\303\211\207" [last-command arg this-command yank error "Previous command was not a yank" undo ses-set-curcell 1] 2 (#$ . 81545) "*p"])
#@334 If the TEXT has a proper set of 'ses attributes, insert the text as
cells, else return nil.  The cells are reprinted--the supplied text is
ignored because the column widths, default printer, etc. at yank time might
be different from those at kill-time.  ARG is a list to indicate that
formulas are to be inserted without relocation.
(defalias 'ses-yank-cells #[(text arg) "\306\307\310#\306GS\310#\211\205\323	\205\323\n@9\205 \n@\311N	@9\205+	@\311N\312	@\n@\313#\312	A\nA\313#\314\f\"\211@\n@Z!
A\nAZ\"\307#\315\211$%\315&\307\316\317\307#'()()W\203\313(
@\\$\f\307*+*+W\203\212*
A\\%\306#\310#\320#\310##	@9\205\245	@\311N&	\204\303$!Z\321\f\"\313#B&\315\211\211E#S#&@$!ZU\204\323\322\323!\210%\"Z&AW\203
%,%\"Z&AW\203\324$%\"\210*T*%T\211%\202\345\325$,S\"\210)	@\203\201\326	8\211&-$H%H\326H\232\204I&\203?&;\204?&\242\327=\204?\327&D&\330$%\331&$\210	\211&A@)&.:\204d\332&\307\211!\"%&&:\203x&\242\333=\204x\333&D&\334$%&#\210*T\211*\202*#\203\245\306#\310#\203\235\322\335!\210\320#\310##'(T\211(/0/\247\203\300/0@Y\205\306\3360/\"*\210\202h\337'!\210.\f\340*\207" [text last first needrows needcols rowcol get-text-property 0 ses ses-cell - -1 ses-yank-resize nil make-progress-reporter "Yanking..." next-single-property-change + error "Cell row error" ses-clear-cell ses-print-cell 2 ses-safe-printer ses-set-cell printer ses-relocate-formula ses-safe-formula ses-cell-set-formula "Missing newline between rows" progress-reporter-do-update progress-reporter-done t rowincr colincr pos myrow mycol x #1=#:--dotimes-temp2-- row #2=#:--dotimes-temp-- col --dotimes-limit-- oldcol ses--cells arg value reporter] 7 (#$ . 82147)])
#@150 Insert the substring [FROM,TO] of TEXT as the formula for cell ROWCOL (a
cons of ROW and COL).  Treat plain symbols as strings unless ARG is a list.
(defalias 'ses-yank-one #[(rowcol text from to arg) "\306\307\310\217\211A	\206
\nGW\203\n	O\202<@\2039@9\2039\f:\2031\311@D\202<\n	O\202<@
@
A\f
:\203M\312D\313
\f#+\207" [val to text from arg rowcol nil (read-from-string text from to) ((error (cons nil from))) quote ses-safe-formula ses-cell-set-formula col row] 5 (#$ . 83926)])
#@245 If TEXT contains tabs and/or newlines, treat the tabs as
column-separators and the newlines as row-separators and insert the text as
cell formulas--else return nil.  Treat plain symbols as strings unless ARG
is a list.  Ignore a final newline.
(defalias 'ses-yank-tsf #[(text arg) "\306\307\"?\206
\310\225GU?\205\323\211GSH\311U\204\312P\313\211C\310\211\314\211\306\307T#\211\203f
B\fTH\311=\203-\n\204T\f\202^\n\fU\204^\315\316!\210\310T\202-\317\n\"\310W\203\300\n\310W\203\266\320\321	@[\313$\321	A\n[\313$B
\211A@)T
@%\210
AT\211\202\201*T\211\202s*\322\321	@\313#\321	A\n\313#\"\210.\323\207" [text rowcol needcols needrows cols spots string-match "[	\n]" 0 10 "\n" -1 nil error "Inconsistent row lengths" ses-yank-resize ses-yank-one + ses-goto-print t pos row --dotimes-limit-- col x arg] 8 (#$ . 84444)])
#@190 If this yank will require inserting rows and/or columns, ask for
confirmation and then insert them.  Result is (row,col) for top left of yank
spot, or error signal if user requests cancel.
(defalias 'ses-yank-resize #[(needrows needcols) "\306 \210\2039\205\307N\202	\310B\311\211\211@
\\	Z\fA\\Z
\310V\310V\204<\n\203\226\312\313\314\203J\313\315
\"\202K\316\203W\n\203W\317\202X\316\n\203d\313\320\"\202e\316$!\204n\321\322!\210\203\311\212\323	\310\"\210\324
!\210*\n\203\226\325SHSH$\210\f+\207" [ses--curcell ses--numrows colbool rowbool rowcol needrows ses-begin-change ses-cell 0 nil y-or-n-p format "Yank will insert %s%s%s.  Continue? " "%d rows" "" " and " "%d columns" error "Cancelled" ses-goto-print ses-insert-row ses-insert-column needcols ses--numcols ses--col-widths ses--col-printers] 9 (#$ . 85348)])
#@124 Export values from the current range, with tabs between columns and
newlines between rows.  Result is placed in kill ring.
(defalias 'ses-export-tsv #[(beg end) "\300\301!\207" [ses-export-tab nil] 2 (#$ . 86230) "r"])
#@126 Export formulas from the current range, with tabs between columns and
newlines between rows.  Result is placed in kill ring.
(defalias 'ses-export-tsf #[(beg end) "\300\301!\207" [ses-export-tab t] 2 (#$ . 86456) "r"])
#@216 Export the current range with tabs between columns and newlines between rows.
Result is placed in kill ring.  The export is values unless WANT-FORMULAS
is non-nil.  Newlines and tabs in the export text are escaped.
(defalias 'ses-export-tab #[(want-formulas) "\306\307!\210\310\311\211\211:\203\f@\202\f9\205(\f:\203%\f@\202&\f\312N\f:\2033\fA\2024\f9\205E\f:\203B\fA\202C\f\312N
@@
AA\311\211 !\"#\211$#V\204n\"!V\203r\313\314!\210\315#$\316#\317%&%&W\2031%$\\ \315!\"\316#\317'&'&W\203''\"\\(\203\272) HH\320H\202\305) HH\317HJ\211\242\321=\203\325\211*A@)\203\337\322=\203\341\323\242\324=\203\364\325	B\211*A@)\326\310\"\327\330\331#\211	B!W\203\330	B\202 #W\203\332	B'T\211'\202\233*%T\211%\202\200.\333\334	\237\"\335	!+\207" [item result print-escape-newlines ses--curcell #1=#:cur #2=#:min ses-check-curcell needrange t nil ses-cell error "Empty range" - -1 0 1 ses-safe-formula *skip* "" quote "'" prin1-to-string replace-regexp-in-string "	" "\\\\t" "\n" apply concat kill-new #3=#:max col row maxcol mincol maxrow minrow #4=#:r --dotimes-limit-- #5=#:c want-formulas ses--cells x] 7 (#$ . 86682)])
#@32 Select the default header row.
(defalias 'ses-unset-header-row #[nil "\300\301!\207" [ses-set-header-row 0] 2 (#$ . 87907) nil])
#@258 Set the ROW to display in the header-line.
With a numerical prefix arg, use that row.
With no prefix arg, use the current row.
With a \[universal-argument] prefix arg, prompt the user.
The top row is row 1.  Selecting row 0 displays the default header row.
(defalias 'ses-set-header-row #[(row) "\305W\204\f	V\203\306\307!\210\310 \210\n\311\312\302\"\210)\313\314E\fB)\315 \207" [row ses--numrows ses--header-row oldval buffer-undo-list 0 error "Invalid header-row" ses-begin-change nil ses-set-parameter apply ses-set-header-row ses-reset-header-string] 3 (#$ . 88043) (list (if (numberp current-prefix-arg) current-prefix-arg (let ((currow (1+ (car (and (symbolp ses--curcell) (get ses--curcell 'ses-cell)))))) (if current-prefix-arg (read-number "Header row: " currow) currow))))])
#@46 Mark the entirety of current row as a range.
(defalias 'ses-mark-row #[nil "\302\303!\210\242\206\n9\205\242\206\304N@\305`!\210\306	T\307\"\210\305`\310\311#\210\306	\307\")\207" [ses--curcell row ses-check-curcell range ses-cell push-mark ses-goto-print 0 nil t] 4 (#$ . 88845) nil])
#@49 Mark the entirety of current column as a range.
(defalias 'ses-mark-column #[nil "\305\306!\210\242\206\n9\205\242\206\307NA\310\311`!\210\312S\n\"\210\313u\210\311`\314\315#\210\f	H\nH\310HJ\316=\203@	T\202-\312	\n\"*\207" [ses--curcell row col ses--numrows ses--cells ses-check-curcell range ses-cell 0 push-mark ses-goto-print 1 nil t *skip*] 4 (#$ . 89147) nil])
#@34 Move point to last cell on line.
(defalias 'ses-end-of-line #[nil "\306\307\310\"\210\205~	S\311\2119\203\"9\205\312N@\202_`\313 W\203.@\2020A9\205D`\313 W\203@@\202BA\312N\211A\fSX\203S\n@\202_\n@T\211
U\203_\314
W\205}H\fH\314HJ\315=\203y\fS\202e\316\f\"+\207" [ses--curcell ses--numcols rowcol row col ses--numrows ses-check-curcell end range nil ses-cell mark 0 *skip* ses-goto-print ses--cells] 4 (#$ . 89535) nil])
#@74 Narrow the buffer so only the print area is visible.
Use after \[widen].
(defalias 'ses-renarrow-buffer #[nil "\301\211\207" [ses--deferred-narrow t] 2 (#$ . 90000) nil])
#@76 Sort the range by a specified column.
With prefix, sorts in REVERSE order.
(defalias 'ses-sort-column #[(sorter &optional reverse) "\306\307!\210@9\205@\310NA9\205A\310N\211@\nA	@	A\311\211\211&'()\312*\313P!9\205B\312*\313P!\310NA\211*\203Y*(Y\203Y*&X\204]\314\315!\210\316')\317#\320+,+,W\203\226\321)+\\*\"\210\322`\323\"\324`\")+\\B
B+T\211+\202k*\325
\326\"-\204\244
\237
\311+\211.\203\326.@+\321+A&T\"\210`\321+A(\"\210\327`\"\fB.A\211.\204\256*\311/0\204\344/\205d1\330=\203\3630\242\330=\202\3651\2030\331 \2030\332 \20302\203\333\3342\"\210\3112\2020\335 \336 U\2040\337\334!\204'\340\334!\2040\333\334\335 \336 {\"\210/\204Q0\341=\204J0\242\330=\203Q0A\204Q\311\2110\202d0\242\330=\203^0A0\3113\342\343!)\210\316')\317#\320+,+,W\205\231\321)+\\(\"\210\344 \210\345\f\211A@\311\"\210+T\211+\202t.\207" [ses--curcell max min end extracts keys ses-check-curcell needrange ses-cell nil intern "1" error "Invalid sort column" - -1 0 ses-goto-print next-single-property-change intangible buffer-substring-no-properties sort #[(x y) "@	@\231\207" [x y] 2] ses-copy-region only region-active-p display-selections-p x-set-selection PRIMARY region-beginning region-end x-selection-owner-p x-selection-exists-p lambda run-hooks deactivate-mark-hook ses-set-curcell ses-yank-cells maxcol maxrow mincol minrow sorter x --dotimes-limit-- reverse --dolist-tail-- force transient-mark-mode select-active-regions saved-region-selection mark-active] 8 (#$ . 90178) "*sSort column: \nP"])
#@37 Mouse version of `ses-sort-column'.
(defalias 'ses-sort-column-click #[(event reverse) "\306!\307\211@)!\210\310!@\311\211W\2030\f\nHV\2030\312\f\nH\313#\nT\211\202\nY\203;\314 \202A\315\316\n!
\")\207" [event position col ses--numcols ses--col-widths reverse event-end select-window posn-col-row 0 - 1 ding ses-sort-column ses-column-letter] 5 (#$ . 91783) "*e\nP"])
#@84 Insert into minibuffer the list of cells currently highlighted in the
spreadsheet.
(defalias 'ses-insert-range #[nil "\303r\304	!q\210\305 \210\306\307!\210\310\311\n@\nAE!A)\312\237!\313\314Oc)\207" [x minibuffer-scroll-window ses--curcell nil window-buffer ses-command-hook ses-check-curcell needrange macroexpand ses-range prin1-to-string 1 -1] 4 (#$ . 92176) "*"])
#@109 Insert "(ses-range x y)" in the minibuffer to represent the currently
highlighted range in the spreadsheet.
(defalias 'ses-insert-ses-range #[nil "\303r\304	!q\210\305 \210\306\307!\210\310\311\n@\nA#)c)\207" [x minibuffer-scroll-window ses--curcell nil window-buffer ses-command-hook ses-check-curcell needrange format "(ses-range %S %S)"] 4 (#$ . 92555) "*"])
#@38 Mouse version of `ses-insert-range'.
(defalias 'ses-insert-range-click #[(event) "\301!\210\302 \207" [event mouse-set-point ses-insert-range] 2 (#$ . 92926) "*e"])
#@42 Mouse version of `ses-insert-ses-range'.
(defalias 'ses-insert-ses-range-click #[(event) "\301!\210\302 \207" [event mouse-set-point ses-insert-ses-range] 2 (#$ . 93098) "*e"])
(defalias 'ses-replace-name-in-formula #[(formula old-name new-name) ":\203\242\305=\204=\203=\242\211:\203%\306\n\f#\240\210\2025\n9\2035\242=\2035\f\240\210)A\211\204	)\207" [formula new-formula elt old-name new-name quote ses-replace-name-in-formula] 6])
#@22 Rename current cell.
(defalias 'ses-rename-cell #[(new-name &optional cell) "\306!\2039\203\307N\203	>\203\310\311!\210\312!\203.\313\314\315\"!\204.\310\316!\210\317\n!\203:\n\320H\202@\321\322 \210\2119\205I\f\307N\211@#
A$\n\206^%#H$H\323\n\320H\nE&B&\324\307
#\210\n\325H\321'\211(\203\256(@\211'9\205\212'\307N)%)@H)AH\211*\326\327*\326H\f#I\210*(A\211(\204|*\330\n\326H!\321'\211(\203\360(@\211'9\205\313'\307N)%)@H)AH\211*\325\331\f*\325H\"BI\210*(A\211(\204\275*	B\fJL\210\n\320I\210\324\f\307\321#\210\332\f!\210`+\333,i$\212\334$T!\210l\203,\335+-$H\326#\202-`).\336+.\337$\210,\340\341\f!D/\342 ,\207" [new-name ses--renamed-cell-symb-list cell ses--curcell sym rowcol local-variable-p ses-cell error "Already a cell name" boundp yes-or-no-p format "`%S' is already bound outside this buffer, continue? " "Already a bound cell name" ses-cell-p 0 nil ses-check-curcell ses-rename-cell put 3 1 ses-replace-name-in-formula ses-formula-references delq makunbound t move-to-column + put-text-property intangible " cell " symbol-name force-mode-line-update row col ses--cells buffer-undo-list ref --dolist-tail-- x xcell pos inhibit-read-only ses--col-widths end mode-line-process] 8 (#$ . 93564) "*SEnter new name: "])
#@75 Return PRINTER if safe, or the substitute printer `ses-unsafe' otherwise.
(defalias 'ses-safe-printer #[(printer) ";\204\242;\204\203\301\302\"\203\207\303\207" [printer ses-warn-unsafe unsafep-function ses-unsafe] 3 (#$ . 94882)])
#@71 Return FORMULA if safe, or the substitute formula *unsafe* otherwise.
(defalias 'ses-safe-formula #[(formula) "\301\302\"\203	\207\303\304DD\207" [formula ses-warn-unsafe unsafep ses-unsafe quote] 3 (#$ . 95133)])
#@221 Apply CHECKER to FORMULA.
If result is non-nil, asks user for confirmation about FORMULA,
which might be unsafe.  Returns t if formula is safe or user allows
execution anyway.  Always returns t if `safe-functions' is t.
(defalias 'ses-warn-unsafe #[(formula checker) "\303=\203\303\207	\n!\211\204\303\207\304\305\306\n	#!\207" [safe-functions checker formula t y-or-n-p format "Formula %S\nmight be unsafe %S.  Process it? "] 6 (#$ . 95358)])
#@66 Clean by `delq' list X from any occurrence of `nil' or `*skip*'.
(defalias 'ses--clean-! #[(&rest x) "\301\302\301\303\"\"\207" [x delq nil *skip*] 5 (#$ . 95814)])
#@128 Clean list X  by replacing by Y any occurrence of `nil' or `*skip*'.

This will change X by making `setcar' on its cons cells.
(defalias 'ses--clean-_ #[(x y) "\304\211\203\n@\211\305>\203\n\240\210\nA\211\204*\207" [x ret-elt ret y nil (nil *skip*)] 3 (#$ . 95987)])
#@1667 Expand to a list of cell-symbols for the range going from
FROM up to TO.  The range automatically expands to include any
new row or column inserted into its middle.  The SES library code
specifically looks for the symbol `ses-range', so don't create an
alias for this macro!

By passing in REST some flags one can configure the way the range
is read and how it is formatted.

In the sequel we assume that cells A1, B1, A2 B2 have respective values
1 2 3 and 4.

Readout direction is specified by a `>v', '`>^', `<v', `<^',
`v>', `v<', `^>', `^<' flag.  For historical reasons, in absence
of such a flag, a default direction of `^<' is assumed.  This
way `(ses-range A1 B2 ^>)' will evaluate to `(1 3 2 4)',
while `(ses-range A1 B2 >^)' will evaluate to (3 4 1 2).

If the range is one row, then `>' can be used as a shorthand to
`>v' or `>^', and `<' to `<v' or `<^'.

If the range is one column, then `v' can be used as a shorthand to
`v>' or `v<', and `^' to `^>' or `v<'.

A `!' flag will remove all cells whose value is nil or `*skip*'.

A `_' flag will replace nil or `*skip*' by the value following
the `_' flag.  If the `_' flag is the last argument, then they are
replaced by integer 0.

A `*', `*1' or `*2' flag will vectorize the range in the sense of
Calc.  See info node `(Calc) Top'.  Flag `*' will output either a
vector or a matrix depending on the number of rows, `*1' will
flatten the result to a one row vector, and `*2' will make a
matrix whatever the number of rows.

Warning: interaction with Calc is experimental and may produce
confusing results if you are not aware of Calc data format.
Use `math-format-value' as a printer for Calc objects.
(defalias 'ses-range '(macro . #[(from to &rest rest) "\306\211\307\306\211\211\211\3102345B\2116:\203$6@\202&69\205:6:\20366@\20286\311N76:\203H6A\202J69\205^6:\203Z6A\202\\6\311N87@8@7A8A\306\2119:;<=\211>=V\204\211<;V\203\215\312\313!\210\314=>\307#\315?@?@W\203\371?>\\:\314;<\307#\315A@A@W\203\357A<\\9
:U\204\32432B2\3063B:H9H\315H3B3:AT\211A\202\266*?T\211?\202\233.32B2C\203C\211AC@\211\316=\203\306\211\306\202\317=\203/\306\211\320\202\321=\203?\306\320\211\202\322=\203O\306\320\306\202\323=\203_\320\306\320\202\324=\203o\320\306\211\202\325=\203\320\211\306\202\326=\203\217\320\211\320\202\327>\203\234\202\330=\203\250\331\202\332=\203\311\333\334\335\336C\203\302C\211AC@\202\303\315EE\2022\211AA)\204\353\337>\203\353\340\341!\342P!CBC\2022\211@A)\204
\343>\203
\340\341!\344P!CBC\202\312\345\"\210)\202\203&\3462\347\"\306\241\210\202,2\237A2\f\2047\350\3512\"2\n\203\211\350\3522\211A2@\"\306DE2\203\204ED2\211A2@\306F\211G\203\200G@FDFD@B\240\210DADGA\211G\204c*\202JE2*\353\354HI	\204\235\355\3562\"B\202\326	\357=\203\254I2\"\202\326	\360=\203\273H2\"\202\326	\361=\203\3252A\203\314H\202\316I2\"\202\326\306.\n\207" [clean vectorize transpose reorient-y reorient-x prev-row nil -1 list ses-cell error "Empty range" - 0 >v >^ t <^ <v v> ^> ^< v< (* *2 *1) ! ses--clean-! _ lambda (&rest x) ses--clean-_ x (> <) intern symbol-name "v" (v ^) ">" "Unexpected flag `%S' in ses-range" last 2 mapcar nreverse #[(x) "C\207" [x] 1] #[(clean result) "\302\303\304	\"BB\207" [clean result 'vec apply append] 5] #[(clean result) "\302\303\304	\"BB\207" [clean result 'vec mapcar #[(x) "\302	BB\207" [clean x 'vec] 3]] 5] apply append *1 *2 * result result-row from to #1=#:cur #2=#:min #3=#:max col row maxcol mincol maxrow minrow #4=#:r --dotimes-limit-- #5=#:c ses--cells rest iter ret elt --dolist-tail-- #6=#:--cl-vectorize-*2-- #7=#:--cl-vectorize-*1--] 9 (#$ . 96276)]))
#@73 Return ARGS reversed, with the blank elements (nil and *skip*) removed.
(defalias 'ses-delete-blanks #[(&rest args) "\304	\304\211\203@\211\305>\204\nBA\211\204\n*)\207" [result args cur --dolist-tail-- nil (nil *skip*)] 3 (#$ . 100119)])
#@52 Compute the sum of the arguments, ignoring blanks.
(defalias 'ses+ #[(&rest args) "\301\302\301\303\"\"\207" [args apply + ses-delete-blanks] 5 (#$ . 100379)])
#@153 Computes the sum of the numbers in LIST, divided by their length.  Blanks
are ignored.  Result is always floating-point, even if all args are integers.
(defalias 'ses-average #[(list) "\301\302\"\303\301\304\"!G\245\207" [list apply ses-delete-blanks float +] 4 (#$ . 100547)])
#@244 Select cells in FROMRANGE that are `equal' to TEST.
For each match, return the corresponding cell from TORANGE.
The ranges are macroexpanded but not evaluated so they should be
either (ses-range BEG END) or (list ...).  The TEST is evaluated.
(defalias 'ses-select '(macro . #[(fromrange test torange) "\306!A\306	!A\307\n!G	GU\204\310\311!\210\312\312\211\203=
@\n\fJ\232\2033	@B	A
A\211\204$*\313)B\207" [fromrange torange test result x --dolist-tail-- macroexpand eval error "ses-select: Ranges not same length" nil list] 3 (#$ . 100836)]))
(byte-code "\302\303\211\203	@\304\305\306#\210	A\211\204*\303\207" [x --dolist-tail-- (ses-cell-value ses-range ses-delete-blanks ses+ ses-average ses-select) nil put side-effect-free t] 5)
#@186 Print VALUE, centered within column.
FILL is the fill character for centering (default = space).
SPAN indicates how many additional rightward columns to include
in width (default = 0).
(defalias 'ses-center #[(value &optional span fill) "	H\206\n	H\306\204\307\204\310\311\"\310W\203N\312
\313\312	[#H#T\211\2020*
\314!Z\211\310X\203a\202z\315
\316\245\"\211\f
\316\246\310V\205y\317!R+\207" [ses--col-printers col ses--default-printer ses--col-widths half width nil 32 0 ses-call-printer + 1 string-width make-string 2 char-to-string printer fill span value x --dotimes-limit--] 9 (#$ . 101607)])
#@172 Print VALUE, centered within the span that starts in the current column
and continues until the next nonblank column.
FILL specifies the fill character (default = space).
(defalias 'ses-center-span #[(value &optional fill) "T\211\nW\203\fH	H\306HJ\307>\203	T\211\202\310
\311	\312##)\207" [col end ses--numcols ses--cells row value 0 (nil *skip*) ses-center - 1 fill] 7 (#$ . 102275)])
#@113 Print VALUE centered using dashes.
SPAN indicates how many rightward columns to include in width (default = 0).
(defalias 'ses-dashfill #[(value &optional span) "\302	\303#\207" [value span ses-center 45] 4 (#$ . 102681)])
#@132 Print VALUE, centered using dashes within the span that starts in the
current column and continues until the next nonblank column.
(defalias 'ses-dashfill-span #[(value) "\301\302\"\207" [value ses-center-span 45] 3 (#$ . 102912)])
#@132 Print VALUE, centered using tildes within the span that starts in the
current column and continues until the next nonblank column.
(defalias 'ses-tildefill-span #[(value) "\301\302\"\207" [value ses-center-span 126] 3 (#$ . 103152)])
#@46 Substitute for an unsafe formula or printer.
(defalias 'ses-unsafe #[(value) "\300\301!\207" [error "Unsafe formula or printer"] 2 (#$ . 103393)])
(byte-code "\303B\304\211\203\n@\305	\306\307#\210\nA\211\204\n*\304\207" [ses-standard-printer-functions x --dolist-tail-- ses-unsafe nil put side-effect-free t] 5)
#@38 Unload the Simple Emacs Spreadsheet.
(defalias 'ses-unload-function #[nil "\302\303\211\203\"	@\304\305\306\307\310!P!#\210\311!\210	A\211\204*\303\207" [fun --dolist-tail-- (copy-region-as-kill yank) nil ad-remove-advice around intern "ses-" symbol-name ad-update] 8 (#$ . 103720)])
(provide 'ses)

MMCT - 2023