aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2011-12-11 18:08:11 +0100
committerJuanma Barranquero2011-12-11 18:08:11 +0100
commit11636b221d2897aed5ca9a762d7b61afd20b6168 (patch)
treebe58eeb6bed6f10ed98673d38ea2c7c37f6890f6
parentcf01819325c78c3d268925256fabedba6ee15424 (diff)
downloademacs-11636b221d2897aed5ca9a762d7b61afd20b6168.tar.gz
emacs-11636b221d2897aed5ca9a762d7b61afd20b6168.zip
Fix typos.
-rw-r--r--lisp/ChangeLog19
-rw-r--r--lisp/gnus/ChangeLog92
-rw-r--r--lisp/ses.el181
3 files changed, 156 insertions, 136 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 985dee25f76..00723a1eb93 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,22 @@
12011-12-11 Juanma Barranquero <lekktu@gmail.com>
2
3 * ses.el (ses-call-printer-return, ses-cell-property-get)
4 (ses-sym-rowcol, ses-printer-validate, ses-formula-record)
5 (ses-create-cell-variable, ses-reset-header-string)
6 (ses-cell-set-formula, ses-repair-cell-reference-all)
7 (ses-self-reference-early-detection, ses-in-print-area, ses-set-curcell)
8 (ses-check-curcell, ses-call-printer, ses-adjust-print-width)
9 (ses-print-cell-new-width, ses-formula-references, ses-relocate-formula)
10 (ses-aset-with-undo, ses-load, ses-truncate-cell)
11 (ses-read-column-printer, ses-read-default-printer, ses-insert-row)
12 (ses-delete-row, ses-delete-column, ses-append-row-jump-first-column)
13 (ses-kill-override, ses-yank-pop, ses-yank-cells, ses-yank-tsf)
14 (ses-yank-resize, ses-export-tab, ses-mark-row, ses-mark-column)
15 (ses-renarrow-buffer, ses-insert-range, ses-insert-ses-range)
16 (ses-safe-printer, ses-safe-formula, ses-warn-unsafe, ses--clean-!)
17 (ses--clean-_, ses-range, ses-select, ses-center, ses-center-span)
18 (ses-dashfill, ses-unsafe): Fix typos and reflow docstrings.
19
12011-12-11 Vincent Belaïche <vincentb1@users.sourceforge.net> 202011-12-11 Vincent Belaïche <vincentb1@users.sourceforge.net>
2 21
3 * ses.el: The overall change is to add cell renaming, that is 22 * ses.el: The overall change is to add cell renaming, that is
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 1984e014725..72f99e65184 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,6 +1,6 @@
12011-12-09 Tassilo Horn <tassilo@member.fsf.org> 12011-12-09 Tassilo Horn <tassilo@member.fsf.org>
2 2
3 * message.el (message-valid-fqdn-regexp): Udate with newly approved 3 * message.el (message-valid-fqdn-regexp): Update with newly approved
4 top-level domain names ".tel" and ".asia". 4 top-level domain names ".tel" and ".asia".
5 5
62011-12-08 Katsumi Yamaoka <yamaoka@jpl.org> 62011-12-08 Katsumi Yamaoka <yamaoka@jpl.org>
@@ -165,7 +165,7 @@
165 165
1662011-10-17 Dave Abrahams <dave@boostpro.com> (tiny change) 1662011-10-17 Dave Abrahams <dave@boostpro.com> (tiny change)
167 167
168 * gnus-registry.el (gnus-registry-enabled): Add new variable. (Bug#9691) 168 * gnus-registry.el (gnus-registry-enabled): Add new variable (bug#9691).
169 (gnus-registry-install-shortcuts): Set `gnus-registry-install' to 'ask 169 (gnus-registry-install-shortcuts): Set `gnus-registry-install' to 'ask
170 only while we need to find out if it should be t or nil. 170 only while we need to find out if it should be t or nil.
171 (gnus-registry-initialize): Don't set `gnus-registry-install' to t. 171 (gnus-registry-initialize): Don't set `gnus-registry-install' to t.
@@ -324,7 +324,7 @@
3242011-09-20 Julien Danjou <julien@danjou.info> 3242011-09-20 Julien Danjou <julien@danjou.info>
325 325
326 * auth-source.el (auth-source-netrc-create): Use default value for 326 * auth-source.el (auth-source-netrc-create): Use default value for
327 password if specified. Evaluate default. 327 password if specified. Evaluate default.
328 (auth-source-plstore-create): Ditto. 328 (auth-source-plstore-create): Ditto.
329 (auth-source-plstore-create, auth-source-netrc-create): Fix default 329 (auth-source-plstore-create, auth-source-netrc-create): Fix default
330 value evaluation. 330 value evaluation.
@@ -641,8 +641,8 @@
641 641
6422011-08-05 Andrew Cohen <cohen@andy.bu.edu> 6422011-08-05 Andrew Cohen <cohen@andy.bu.edu>
643 643
644 * gnus-sum.el (gnus-summary-refer-article): Warp to article. This 644 * gnus-sum.el (gnus-summary-refer-article): Warp to article.
645 allows article-referral to work from an nnir group. 645 This allows article-referral to work from an nnir group.
646 646
6472011-08-04 Andrew Cohen <cohen@andy.bu.edu> 6472011-08-04 Andrew Cohen <cohen@andy.bu.edu>
648 648
@@ -658,7 +658,7 @@
6582011-08-03 Andrew Cohen <cohen@andy.bu.edu> 6582011-08-03 Andrew Cohen <cohen@andy.bu.edu>
659 659
660 * nnir.el (nnir-read-server-parm): Add an argument to restrict to 660 * nnir.el (nnir-read-server-parm): Add an argument to restrict to
661 server-variables only. This should fix a bug introduced with commit 661 server-variables only. This should fix a bug introduced with commit
662 e1889675b7f4adf057833c5513c9374134c4e053. 662 e1889675b7f4adf057833c5513c9374134c4e053.
663 (nnir-run-query): 'nnir-search-engine should not be set from the global 663 (nnir-run-query): 'nnir-search-engine should not be set from the global
664 environment. 664 environment.
@@ -1858,7 +1858,7 @@
18582011-03-21 Julien Danjou <julien@danjou.info> 18582011-03-21 Julien Danjou <julien@danjou.info>
1859 1859
1860 * mm-view.el (mm-display-inline-fontify): Make mode optional, and call 1860 * mm-view.el (mm-display-inline-fontify): Make mode optional, and call
1861 normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer 1861 normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer
1862 query. 1862 query.
1863 (mm-inline-text): Render normal text with fontification whenever 1863 (mm-inline-text): Render normal text with fontification whenever
1864 possible. 1864 possible.
@@ -2702,9 +2702,9 @@
2702 * gnus.el (gnus-summary-line-format): Mention &user-date format in 2702 * gnus.el (gnus-summary-line-format): Mention &user-date format in
2703 docstring. 2703 docstring.
2704 2704
2705 * gnus.el (gnus-user-date-format-alist): Change default value. Use 2705 * gnus.el (gnus-user-date-format-alist): Change default value.
2706 defcustom, with type and group. Move from gnus-util.el. Rename to 2706 Use defcustom, with type and group. Move from gnus-util.el.
2707 gnus-summary-user-date-format-alist. 2707 Rename to gnus-summary-user-date-format-alist.
2708 2708
27092011-02-03 Glenn Morris <rgm@gnu.org> 27092011-02-03 Glenn Morris <rgm@gnu.org>
2710 2710
@@ -3231,12 +3231,12 @@
32312010-12-17 Julien Danjou <julien@danjou.info> 32312010-12-17 Julien Danjou <julien@danjou.info>
3232 3232
3233 * gnus-util.el (gnus-rescale-image): Allow to resize images even if 3233 * gnus-util.el (gnus-rescale-image): Allow to resize images even if
3234 they are from file. Can also scale up. 3234 they are from file. Can also scale up.
3235 3235
32362010-12-17 Andrew Cohen <cohen@andy.bu.edu> 32362010-12-17 Andrew Cohen <cohen@andy.bu.edu>
3237 3237
3238 * gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore 3238 * gnus-sum.el (gnus-summary-refer-thread): Simplify code.
3239 gnus-use-agent. 3239 Restore gnus-use-agent.
3240 (gnus-get-newsgroup-headers): Avoid unwanted spaces at eol. 3240 (gnus-get-newsgroup-headers): Avoid unwanted spaces at eol.
3241 3241
3242 * nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null. 3242 * nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null.
@@ -3594,7 +3594,7 @@
3594 * nnir.el: Update to handle the registry better. 3594 * nnir.el: Update to handle the registry better.
3595 (autoload): Silence byte-compiler. 3595 (autoload): Silence byte-compiler.
3596 (nnir-open-server): Add a hook for nnir groups. 3596 (nnir-open-server): Add a hook for nnir groups.
3597 (nnir-request-move-article): Don't mangle the header. Better to use 3597 (nnir-request-move-article): Don't mangle the header. Better to use
3598 formating variables (which will be added in the future). 3598 formating variables (which will be added in the future).
3599 (nnir-registry-action): Update the registry using the original article 3599 (nnir-registry-action): Update the registry using the original article
3600 group name. 3600 group name.
@@ -4030,7 +4030,7 @@
40302010-11-21 Andrew Cohen <cohen@andy.bu.edu> 40302010-11-21 Andrew Cohen <cohen@andy.bu.edu>
4031 4031
4032 * nnir.el: Fix typo in comments. 4032 * nnir.el: Fix typo in comments.
4033 (nnir-run-imap): Simplify code. No need to reverse artlist. 4033 (nnir-run-imap): Simplify code. No need to reverse artlist.
4034 (nnir-run-gmane): Use nnir-tmp-buffer for web results. 4034 (nnir-run-gmane): Use nnir-tmp-buffer for web results.
4035 4035
40362010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 40362010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -4062,8 +4062,8 @@
4062 4062
40632010-11-19 Katsumi Yamaoka <yamaoka@jpl.org> 40632010-11-19 Katsumi Yamaoka <yamaoka@jpl.org>
4064 4064
4065 * gnus-art.el (gnus-mime-display-single) 4065 * gnus-art.el (gnus-mime-display-single):
4066 * gnus-html.el (gnus-html-wash-images, gnus-html-prefetch-images) 4066 * gnus-html.el (gnus-html-wash-images, gnus-html-prefetch-images):
4067 * mm-decode.el (mm-shr): Assume that gnus-inhibit-images may be a group 4067 * mm-decode.el (mm-shr): Assume that gnus-inhibit-images may be a group
4068 parameter. 4068 parameter.
4069 4069
@@ -4418,7 +4418,7 @@
4418 * gnus-util.el (gnus-string-match-p): New function, that is an alias to 4418 * gnus-util.el (gnus-string-match-p): New function, that is an alias to
4419 string-match-p in Emacs >=23. 4419 string-match-p in Emacs >=23.
4420 4420
4421 * gnus-msg.el (gnus-configure-posting-styles) 4421 * gnus-msg.el (gnus-configure-posting-styles):
4422 * nnir.el (nnir-run-gmane): Use gnus-string-match-p. 4422 * nnir.el (nnir-run-gmane): Use gnus-string-match-p.
4423 4423
44242010-11-01 Glenn Morris <rgm@gnu.org> 44242010-11-01 Glenn Morris <rgm@gnu.org>
@@ -5366,8 +5366,8 @@
5366 * gnus-util.el (gnus-remove-if): Allow hash table. 5366 * gnus-util.el (gnus-remove-if): Allow hash table.
5367 (gnus-remove-if-not): New function. 5367 (gnus-remove-if-not): New function.
5368 5368
5369 * gnus-art.el (gnus-mime-view-part-as-type) 5369 * gnus-art.el (gnus-mime-view-part-as-type):
5370 * gnus-score.el (gnus-summary-score-effect) 5370 * gnus-score.el (gnus-summary-score-effect):
5371 * gnus-sum.el (gnus-read-move-group-name): 5371 * gnus-sum.el (gnus-read-move-group-name):
5372 Replace remove-if-not with gnus-remove-if-not. 5372 Replace remove-if-not with gnus-remove-if-not.
5373 5373
@@ -5856,8 +5856,8 @@
58562010-09-29 Katsumi Yamaoka <yamaoka@jpl.org> 58562010-09-29 Katsumi Yamaoka <yamaoka@jpl.org>
5857 5857
5858 * mm-util.el (mm-codepage-iso-8859-list, mm-charset-eval-alist) 5858 * mm-util.el (mm-codepage-iso-8859-list, mm-charset-eval-alist)
5859 (mm-mime-charset) 5859 (mm-mime-charset):
5860 * rfc2047.el (rfc2047-syntax-table) 5860 * rfc2047.el (rfc2047-syntax-table):
5861 * utf7.el (utf7-utf-16-coding-system): Comment fix. 5861 * utf7.el (utf7-utf-16-coding-system): Comment fix.
5862 5862
5863 * nnrss.el (nnrss-read-server-data, nnrss-read-group-data): Use `load' 5863 * nnrss.el (nnrss-read-server-data, nnrss-read-group-data): Use `load'
@@ -5872,8 +5872,8 @@
5872 5872
58732010-09-28 Katsumi Yamaoka <yamaoka@jpl.org> 58732010-09-28 Katsumi Yamaoka <yamaoka@jpl.org>
5874 5874
5875 * mail-source.el (mail-source-report-new-mail) 5875 * mail-source.el (mail-source-report-new-mail):
5876 * message.el (message-default-mail-headers) 5876 * message.el (message-default-mail-headers):
5877 * mm-decode.el (mm-valid-image-format-p): Comment fix. 5877 * mm-decode.el (mm-valid-image-format-p): Comment fix.
5878 5878
5879 * mml2015.el (mml2015-use): Don't bind recursive-load-depth-limit. 5879 * mml2015.el (mml2015-use): Don't bind recursive-load-depth-limit.
@@ -6369,8 +6369,8 @@
6369 (gnus-article-next-page-1): No need to adjust the number of lines. 6369 (gnus-article-next-page-1): No need to adjust the number of lines.
6370 (gnus-article-describe-bindings): Always use help-buffer. 6370 (gnus-article-describe-bindings): Always use help-buffer.
6371 6371
6372 * gnus-audio.el (gnus-audio-inline-sound) 6372 * gnus-audio.el (gnus-audio-inline-sound):
6373 * gnus-cus.el (gnus-custom-mode) 6373 * gnus-cus.el (gnus-custom-mode):
6374 * gnus-group.el (gnus-group-update-tool-bar): Comment fix. 6374 * gnus-group.el (gnus-group-update-tool-bar): Comment fix.
6375 6375
6376 * gnus-sum.el (gnus-remove-overlays): Doc fix. 6376 * gnus-sum.el (gnus-remove-overlays): Doc fix.
@@ -6566,9 +6566,9 @@
6566 6566
65672010-09-22 Katsumi Yamaoka <yamaoka@jpl.org> 65672010-09-22 Katsumi Yamaoka <yamaoka@jpl.org>
6568 6568
6569 * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes) 6569 * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes):
6570 * mm-util.el (mm-decompress-buffer) 6570 * mm-util.el (mm-decompress-buffer):
6571 * nnir.el (nnir-run-find-grep) 6571 * nnir.el (nnir-run-find-grep):
6572 * pop3.el (pop3-list): Use 3rd arg of split-string. 6572 * pop3.el (pop3-list): Use 3rd arg of split-string.
6573 6573
65742010-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 65742010-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -7434,7 +7434,7 @@
74342010-09-01 Katsumi Yamaoka <yamaoka@jpl.org> 74342010-09-01 Katsumi Yamaoka <yamaoka@jpl.org>
7435 7435
7436 * gnus-html.el (gnus-html-cache-directory, gnus-html-cache-size) 7436 * gnus-html.el (gnus-html-cache-directory, gnus-html-cache-size)
7437 (gnus-html-frame-width, gnus-blocked-images) 7437 (gnus-html-frame-width, gnus-blocked-images):
7438 * message.el (message-prune-recipient-rules): Add custom version. 7438 * message.el (message-prune-recipient-rules): Add custom version.
7439 * gnus-sum.el (gnus-auto-expirable-marks): Bump custom version. 7439 * gnus-sum.el (gnus-auto-expirable-marks): Bump custom version.
7440 7440
@@ -7484,11 +7484,11 @@
7484 * gnus-ems.el: Provide compatibility functions for 7484 * gnus-ems.el: Provide compatibility functions for
7485 gnus-set-process-plist. 7485 gnus-set-process-plist.
7486 7486
7487 * gnus-sum.el (gnus-summary-stop-at-end-of-message) 7487 * gnus-sum.el (gnus-summary-stop-at-end-of-message):
7488 * gnus.el (gnus-valid-select-methods) 7488 * gnus.el (gnus-valid-select-methods):
7489 * message.el (message-send-mail-partially-limit) 7489 * message.el (message-send-mail-partially-limit):
7490 * mm-decode.el (mm-text-html-renderer) 7490 * mm-decode.el (mm-text-html-renderer):
7491 * mml.el (mml-insert-mime-headers-always) 7491 * mml.el (mml-insert-mime-headers-always):
7492 * smiley.el (smiley-regexp-alist): Bump custom version. 7492 * smiley.el (smiley-regexp-alist): Bump custom version.
7493 7493
74942010-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org> 74942010-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -7820,7 +7820,7 @@
7820 7820
78212010-05-13 Katsumi Yamaoka <yamaoka@jpl.org> 78212010-05-13 Katsumi Yamaoka <yamaoka@jpl.org>
7822 7822
7823 * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt) 7823 * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt):
7824 * mml2015.el (mml2015-gpg-encrypt): Disable multibyte in buffers 7824 * mml2015.el (mml2015-gpg-encrypt): Disable multibyte in buffers
7825 generated within the mm-with-unibyte-current-buffer macro. 7825 generated within the mm-with-unibyte-current-buffer macro.
7826 7826
@@ -7895,11 +7895,11 @@
7895 7895
78962010-05-07 Katsumi Yamaoka <yamaoka@jpl.org> 78962010-05-07 Katsumi Yamaoka <yamaoka@jpl.org>
7897 7897
7898 * nnweb.el (nnweb-gmane-search) 7898 * nnweb.el (nnweb-gmane-search):
7899 * yenc.el (yenc-decode-region): Don't run set-buffer-multibyte for 7899 * yenc.el (yenc-decode-region): Don't run set-buffer-multibyte for
7900 XEmacs. 7900 XEmacs.
7901 7901
7902 * gnus-art.el (gnus-article-browse-html-parts) 7902 * gnus-art.el (gnus-article-browse-html-parts):
7903 * gnus-group.el (gnus-read-ephemeral-gmane-group) 7903 * gnus-group.el (gnus-read-ephemeral-gmane-group)
7904 (gnus-read-ephemeral-bug-grou): Use mm-make-temp-file instead of 7904 (gnus-read-ephemeral-bug-grou): Use mm-make-temp-file instead of
7905 make-temp-file. 7905 make-temp-file.
@@ -10607,10 +10607,10 @@
10607 10607
106082007-12-05 Katsumi Yamaoka <yamaoka@jpl.org> 106082007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
10609 10609
10610 * gnus-art.el (gnus-use-idna) 10610 * gnus-art.el (gnus-use-idna):
10611 * gnus-start.el (gnus-site-init-file) 10611 * gnus-start.el (gnus-site-init-file):
10612 * message.el (message-use-idna) 10612 * message.el (message-use-idna):
10613 * mm-uu.el (mm-uu-hide-markers) 10613 * mm-uu.el (mm-uu-hide-markers):
10614 * smiley.el (smiley-style): Revert changes that suppress warnings. 10614 * smiley.el (smiley-style): Revert changes that suppress warnings.
10615 10615
106162007-12-05 Katsumi Yamaoka <yamaoka@jpl.org> 106162007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
@@ -11912,13 +11912,13 @@
119122007-05-25 Katsumi Yamaoka <yamaoka@jpl.org> 119122007-05-25 Katsumi Yamaoka <yamaoka@jpl.org>
11913 11913
11914 * gnus-art.el (gnus-header-from, gnus-header-subject, gnus-header-name) 11914 * gnus-art.el (gnus-header-from, gnus-header-subject, gnus-header-name)
11915 (gnus-header-content) 11915 (gnus-header-content):
11916 * gnus-cite.el (gnus-cite-10) 11916 * gnus-cite.el (gnus-cite-10):
11917 * gnus-srvr.el (gnus-server-closed) 11917 * gnus-srvr.el (gnus-server-closed):
11918 * gnus.el (gnus-group-mail-1, gnus-group-mail-1-empty) 11918 * gnus.el (gnus-group-mail-1, gnus-group-mail-1-empty)
11919 (gnus-group-mail-2, gnus-group-mail-2-empty, gnus-group-mail-3) 11919 (gnus-group-mail-2, gnus-group-mail-2-empty, gnus-group-mail-3)
11920 (gnus-group-mail-3-empty, gnus-group-mail-low) 11920 (gnus-group-mail-3-empty, gnus-group-mail-low)
11921 (gnus-group-mail-low-empty, gnus-splash) 11921 (gnus-group-mail-low-empty, gnus-splash):
11922 * message.el (message-header-to, message-header-cc) 11922 * message.el (message-header-to, message-header-cc)
11923 (message-header-subject, message-header-other, message-header-name) 11923 (message-header-subject, message-header-other, message-header-name)
11924 (message-header-xheader, message-separator, message-cited-text) 11924 (message-header-xheader, message-separator, message-cited-text)
diff --git a/lisp/ses.el b/lisp/ses.el
index d49b8cb7564..403651695a8 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -327,7 +327,7 @@ need to be recalculated.")
327 327
328(defvar ses-call-printer-return nil 328(defvar ses-call-printer-return nil
329 "Set to t if last cell printer invoked by `ses-call-printer' requested 329 "Set to t if last cell printer invoked by `ses-call-printer' requested
330left-justification of the result. Set to error-signal if ses-call-printer 330left-justification of the result. Set to error-signal if `ses-call-printer'
331encountered an error during printing. Otherwise nil.") 331encountered an error during printing. Otherwise nil.")
332 332
333(defvar ses-start-time nil 333(defvar ses-start-time nil
@@ -394,7 +394,7 @@ functions refer to its value."
394 val))))) 394 val)))))
395 395
396(defmacro ses-cell-property-get (property-name row &optional col) 396(defmacro ses-cell-property-get (property-name row &optional col)
397 "Get property named PROPERTY-NAME From a CELL or a pair (ROW,COL). 397 "Get property named PROPERTY-NAME from a CELL or a pair (ROW,COL).
398 398
399When COL is omitted, CELL=ROW is a cell object. When COL is 399When COL is omitted, CELL=ROW is a cell object. When COL is
400present ROW and COL are the integer coordinates of the cell of 400present ROW and COL are the integer coordinates of the cell of
@@ -490,8 +490,8 @@ PROPERTY-NAME."
490 `(aref ses--col-printers ,col)) 490 `(aref ses--col-printers ,col))
491 491
492(defmacro ses-sym-rowcol (sym) 492(defmacro ses-sym-rowcol (sym)
493 "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result 493 "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0).
494is nil if SYM is not a symbol that names a cell." 494Result is nil if SYM is not a symbol that names a cell."
495 `(and (symbolp ,sym) (get ,sym 'ses-cell))) 495 `(and (symbolp ,sym) (get ,sym 'ses-cell)))
496 496
497(defmacro ses-cell (sym value formula printer references) 497(defmacro ses-cell (sym value formula printer references)
@@ -625,7 +625,7 @@ is a vector--if a symbol, the new vector is assigned as the symbol's value."
625 (delete-region pos (point)))) 625 (delete-region pos (point))))
626 626
627(defun ses-printer-validate (printer) 627(defun ses-printer-validate (printer)
628 "Signals an error if PRINTER is not a valid SES cell printer." 628 "Signal an error if PRINTER is not a valid SES cell printer."
629 (or (not printer) 629 (or (not printer)
630 (stringp printer) 630 (stringp printer)
631 (functionp printer) 631 (functionp printer)
@@ -642,7 +642,7 @@ checking that it is a valid printer function."
642 (add-to-list 'ses-read-printer-history (prin1-to-string printer)))) 642 (add-to-list 'ses-read-printer-history (prin1-to-string printer))))
643 643
644(defun ses-formula-record (formula) 644(defun ses-formula-record (formula)
645 "If FORMULA is of the form 'symbol, adds it to the list of symbolic formulas 645 "If FORMULA is of the form 'symbol, add it to the list of symbolic formulas
646for this spreadsheet." 646for this spreadsheet."
647 (when (and (eq (car-safe formula) 'quote) 647 (when (and (eq (car-safe formula) 'quote)
648 (symbolp (cadr formula))) 648 (symbolp (cadr formula)))
@@ -676,7 +676,7 @@ for this spreadsheet."
676 676
677(defun ses-create-cell-variable (sym row col) 677(defun ses-create-cell-variable (sym row col)
678 "Create a buffer-local variable for cell with symbol 678 "Create a buffer-local variable for cell with symbol
679SYM at position ROW COL. Return nil in case of failure." 679SYM at position ROW COL. Return nil in case of failure."
680 (unless (local-variable-p sym) 680 (unless (local-variable-p sym)
681 (make-local-variable sym) 681 (make-local-variable sym)
682 (put sym 'ses-cell (cons row col)))) 682 (put sym 'ses-cell (cons row col))))
@@ -698,7 +698,7 @@ SYM at position ROW COL. Return nil in case of failure."
698 buffer-undo-list)) 698 buffer-undo-list))
699 699
700(defun ses-reset-header-string () 700(defun ses-reset-header-string ()
701 "Flags the header string for update. Upon undo, the header string will be 701 "Flag the header string for update. Upon undo, the header string will be
702updated again." 702updated again."
703 (push '(apply ses-reset-header-string) buffer-undo-list) 703 (push '(apply ses-reset-header-string) buffer-undo-list)
704 (setq ses--header-hscroll -1)) 704 (setq ses--header-hscroll -1))
@@ -734,7 +734,7 @@ cell (ROW,COL). This is undoable. The cell's data will be updated through
734 nil) ; Make coverage-tester happy. 734 nil) ; Make coverage-tester happy.
735 735
736(defun ses-cell-set-formula (row col formula) 736(defun ses-cell-set-formula (row col formula)
737 "Store a new formula for (ROW . COL) and enqueues the cell for 737 "Store a new formula for (ROW . COL) and enqueue the cell for
738recalculation via `post-command-hook'. Updates the reference lists for the 738recalculation via `post-command-hook'. Updates the reference lists for the
739cells that this cell refers to. Does not update cell value or reprint the 739cells that this cell refers to. Does not update cell value or reprint the
740cell. To avoid inconsistencies, this function is not interruptible, which 740cell. To avoid inconsistencies, this function is not interruptible, which
@@ -819,9 +819,9 @@ means Emacs will crash if FORMULA contains a circular list."
819 errors))))) 819 errors)))))
820 (if errors 820 (if errors
821 (warn "---------------------------------------------------------------- 821 (warn "----------------------------------------------------------------
822Some reference where corrupted. 822Some references were corrupted.
823 823
824The following is a list of where each element ELT is such 824The following is a list where each element ELT is such
825that (car ELT) is the reference of cell CELL with corruption, 825that (car ELT) is the reference of cell CELL with corruption,
826and (cdr ELT) is a property list where 826and (cdr ELT) is a property list where
827 827
@@ -929,8 +929,7 @@ the old and FORCE is nil."
929 (ses-cell-set-formula row col nil)) 929 (ses-cell-set-formula row col nil))
930 930
931(defcustom ses-self-reference-early-detection nil 931(defcustom ses-self-reference-early-detection nil
932 "True if cycle detection is early for cells that refer to 932 "True if cycle detection is early for cells that refer to themselves."
933themselves."
934 :type 'boolean 933 :type 'boolean
935 :group 'ses) 934 :group 'ses)
936 935
@@ -996,7 +995,7 @@ if the cell's value is unchanged and FORCE is nil."
996;;---------------------------------------------------------------------------- 995;;----------------------------------------------------------------------------
997 996
998(defun ses-in-print-area () 997(defun ses-in-print-area ()
999 "Returns t if point is in print area of spreadsheet." 998 "Return t if point is in print area of spreadsheet."
1000 (<= (point) ses--data-marker)) 999 (<= (point) ses--data-marker))
1001 1000
1002;; We turn off point-motion-hooks and explicitly position the cursor, in case 1001;; We turn off point-motion-hooks and explicitly position the cursor, in case
@@ -1018,7 +1017,7 @@ if the cell's value is unchanged and FORCE is nil."
1018 (forward-char)))) 1017 (forward-char))))
1019 1018
1020(defun ses-set-curcell () 1019(defun ses-set-curcell ()
1021 "Sets `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a 1020 "Set `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a
1022region, or nil if cursor is not at a cell." 1021region, or nil if cursor is not at a cell."
1023 (if (or (not mark-active) 1022 (if (or (not mark-active)
1024 deactivate-mark 1023 deactivate-mark
@@ -1037,10 +1036,10 @@ region, or nil if cursor is not at a cell."
1037 nil) 1036 nil)
1038 1037
1039(defun ses-check-curcell (&rest args) 1038(defun ses-check-curcell (&rest args)
1040 "Signal an error if ses--curcell is inappropriate. The end marker is 1039 "Signal an error if `ses--curcell' is inappropriate.
1041appropriate if some argument is 'end. A range is appropriate if some 1040The end marker is appropriate if some argument is 'end.
1042argument is 'range. A single cell is appropriate unless some argument is 1041A range is appropriate if some argument is 'range.
1043'needrange." 1042A single cell is appropriate unless some argument is 'needrange."
1044 (if (eq ses--curcell t) 1043 (if (eq ses--curcell t)
1045 ;; curcell recalculation was postponed, but user typed ahead. 1044 ;; curcell recalculation was postponed, but user typed ahead.
1046 (ses-set-curcell)) 1045 (ses-set-curcell))
@@ -1175,7 +1174,7 @@ preceding cell has spilled over."
1175 sig))) 1174 sig)))
1176 1175
1177(defun ses-call-printer (printer &optional value) 1176(defun ses-call-printer (printer &optional value)
1178 "Invokes PRINTER (a string or parenthesized string or function-symbol or 1177 "Invoke PRINTER (a string or parenthesized string or function-symbol or
1179lambda of one argument) on VALUE. Result is the printed cell as a string. 1178lambda of one argument) on VALUE. Result is the printed cell as a string.
1180The variable `ses-call-printer-return' is set to t if the printer used 1179The variable `ses-call-printer-return' is set to t if the printer used
1181parenthesis to request left-justification, or the error-signal if the 1180parenthesis to request left-justification, or the error-signal if the
@@ -1207,7 +1206,7 @@ printer signaled one (and \"%s\" is used as the default printer), else nil."
1207(defun ses-adjust-print-width (col change) 1206(defun ses-adjust-print-width (col change)
1208 "Insert CHANGE spaces in front of column COL, or at end of line if 1207 "Insert CHANGE spaces in front of column COL, or at end of line if
1209COL=NUMCOLS. Deletes characters if CHANGE < 0. Caller should bind 1208COL=NUMCOLS. Deletes characters if CHANGE < 0. Caller should bind
1210inhibit-quit to t." 1209`inhibit-quit' to t."
1211 (let ((inhibit-read-only t) 1210 (let ((inhibit-read-only t)
1212 (blank (if (> change 0) (make-string change ?\s))) 1211 (blank (if (> change 0) (make-string change ?\s)))
1213 (at-end (= col ses--numcols))) 1212 (at-end (= col ses--numcols)))
@@ -1226,9 +1225,9 @@ inhibit-quit to t."
1226 (delete-char (- change)))))) 1225 (delete-char (- change))))))
1227 1226
1228(defun ses-print-cell-new-width (row col) 1227(defun ses-print-cell-new-width (row col)
1229 "Same as ses-print-cell, except if the cell's value is *skip*, the preceding 1228 "Same as `ses-print-cell', except if the cell's value is *skip*,
1230nonskipped cell is reprinted. This function is used when the width of 1229the preceding nonskipped cell is reprinted. This function is used
1231cell (ROW,COL) has changed." 1230when the width of cell (ROW,COL) has changed."
1232 (if (not (eq (ses-cell-value row col) '*skip*)) 1231 (if (not (eq (ses-cell-value row col) '*skip*))
1233 (ses-print-cell row col) 1232 (ses-print-cell row col)
1234 ;;Cell was skipped over - reprint previous 1233 ;;Cell was skipped over - reprint previous
@@ -1351,7 +1350,7 @@ Newlines in the data are escaped."
1351;;---------------------------------------------------------------------------- 1350;;----------------------------------------------------------------------------
1352 1351
1353(defun ses-formula-references (formula &optional result-so-far) 1352(defun ses-formula-references (formula &optional result-so-far)
1354 "Produce a list of symbols for cells that this formula's value 1353 "Produce a list of symbols for cells that this FORMULA's value
1355refers to. For recursive calls, RESULT-SO-FAR is the list being 1354refers to. For recursive calls, RESULT-SO-FAR is the list being
1356constructed, or t to get a wrong-type-argument error when the 1355constructed, or t to get a wrong-type-argument error when the
1357first reference is found." 1356first reference is found."
@@ -1396,8 +1395,8 @@ by (ROWINCR,COLINCR)."
1396 1395
1397(defun ses-relocate-formula (formula startrow startcol rowincr colincr) 1396(defun ses-relocate-formula (formula startrow startcol rowincr colincr)
1398 "Produce a copy of FORMULA where all symbols that refer to cells in row 1397 "Produce a copy of FORMULA where all symbols that refer to cells in row
1399STARTROW or above and col STARTCOL or above are altered by adding ROWINCR 1398STARTROW or above, and col STARTCOL or above, are altered by adding ROWINCR
1400and COLINCR. STARTROW and STARTCOL are 0-based. Example: 1399and COLINCR. STARTROW and STARTCOL are 0-based. Example:
1401 (ses-relocate-formula '(+ A1 B2 D3) 1 2 1 -1) 1400 (ses-relocate-formula '(+ A1 B2 D3) 1 2 1 -1)
1402 => (+ A1 B2 C4) 1401 => (+ A1 B2 C4)
1403If ROWINCR or COLINCR is negative, references to cells being deleted are 1402If ROWINCR or COLINCR is negative, references to cells being deleted are
@@ -1647,7 +1646,8 @@ to each symbol."
1647 (makunbound sym))) 1646 (makunbound sym)))
1648 1647
1649(defun ses-aset-with-undo (array idx newval) 1648(defun ses-aset-with-undo (array idx newval)
1650 "Like aset, but undoable. Result is t if element has changed" 1649 "Like `aset', but undoable.
1650Result is t if element has changed."
1651 (unless (equal (aref array idx) newval) 1651 (unless (equal (aref array idx) newval)
1652 (push `(apply ses-aset-with-undo ,array ,idx 1652 (push `(apply ses-aset-with-undo ,array ,idx
1653 ,(aref array idx)) buffer-undo-list) 1653 ,(aref array idx)) buffer-undo-list)
@@ -1660,8 +1660,8 @@ to each symbol."
1660;;---------------------------------------------------------------------------- 1660;;----------------------------------------------------------------------------
1661 1661
1662(defun ses-load () 1662(defun ses-load ()
1663 "Parse the current buffer and sets up buffer-local variables. Does not 1663 "Parse the current buffer and set up buffer-local variables.
1664execute cell formulas or print functions." 1664Does not execute cell formulas or print functions."
1665 (widen) 1665 (widen)
1666 ;; Read our global parameters, which should be a 3-element list. 1666 ;; Read our global parameters, which should be a 3-element list.
1667 (goto-char (point-max)) 1667 (goto-char (point-max))
@@ -2109,8 +2109,7 @@ to are recalculated first."
2109 (ses-jump-safe startcell))) 2109 (ses-jump-safe startcell)))
2110 2110
2111(defun ses-truncate-cell () 2111(defun ses-truncate-cell ()
2112 "Reprint current cell, but without spillover into any following blank 2112 "Reprint current cell, but without spillover into any following blank cells."
2113cells."
2114 (interactive "*") 2113 (interactive "*")
2115 (ses-check-curcell) 2114 (ses-check-curcell)
2116 (let* ((rowcol (ses-sym-rowcol ses--curcell)) 2115 (let* ((rowcol (ses-sym-rowcol ses--curcell))
@@ -2358,8 +2357,8 @@ right-justified) or a list of one string (will be left-justified)."
2358 (ses-print-cell row col)))) 2357 (ses-print-cell row col))))
2359 2358
2360(defun ses-read-column-printer (col newval) 2359(defun ses-read-column-printer (col newval)
2361 "Set the printer function for the current column. See 2360 "Set the printer function for the current column.
2362`ses-read-cell-printer' for input forms." 2361See `ses-read-cell-printer' for input forms."
2363 (interactive 2362 (interactive
2364 (let ((col (cdr (ses-sym-rowcol ses--curcell)))) 2363 (let ((col (cdr (ses-sym-rowcol ses--curcell))))
2365 (ses-check-curcell) 2364 (ses-check-curcell)
@@ -2375,8 +2374,8 @@ right-justified) or a list of one string (will be left-justified)."
2375 (ses-print-cell row col))))) 2374 (ses-print-cell row col)))))
2376 2375
2377(defun ses-read-default-printer (newval) 2376(defun ses-read-default-printer (newval)
2378 "Set the default printer function for cells that have no other. See 2377 "Set the default printer function for cells that have no other.
2379`ses-read-cell-printer' for input forms." 2378See `ses-read-cell-printer' for input forms."
2380 (interactive 2379 (interactive
2381 (list (ses-read-printer "Default printer: " ses--default-printer))) 2380 (list (ses-read-printer "Default printer: " ses--default-printer)))
2382 (unless (eq newval t) 2381 (unless (eq newval t)
@@ -2390,8 +2389,8 @@ right-justified) or a list of one string (will be left-justified)."
2390;;---------------------------------------------------------------------------- 2389;;----------------------------------------------------------------------------
2391 2390
2392(defun ses-insert-row (count) 2391(defun ses-insert-row (count)
2393 "Insert a new row before the current one. With prefix, insert COUNT rows 2392 "Insert a new row before the current one.
2394before current one." 2393With prefix, insert COUNT rows before current one."
2395 (interactive "*p") 2394 (interactive "*p")
2396 (ses-check-curcell 'end) 2395 (ses-check-curcell 'end)
2397 (or (> count 0) (signal 'args-out-of-range nil)) 2396 (or (> count 0) (signal 'args-out-of-range nil))
@@ -2443,8 +2442,8 @@ before current one."
2443 (ses-goto-print (1- ses--numrows) 0))) 2442 (ses-goto-print (1- ses--numrows) 0)))
2444 2443
2445(defun ses-delete-row (count) 2444(defun ses-delete-row (count)
2446 "Delete the current row. With prefix, Deletes COUNT rows starting from the 2445 "Delete the current row.
2447current one." 2446With prefix, deletes COUNT rows starting from the current one."
2448 (interactive "*p") 2447 (interactive "*p")
2449 (ses-check-curcell) 2448 (ses-check-curcell)
2450 (or (> count 0) (signal 'args-out-of-range nil)) 2449 (or (> count 0) (signal 'args-out-of-range nil))
@@ -2536,8 +2535,8 @@ If COL is specified, the new column(s) get the specified WIDTH and PRINTER
2536 (ses-jump-safe ses--curcell)) 2535 (ses-jump-safe ses--curcell))
2537 2536
2538(defun ses-delete-column (count) 2537(defun ses-delete-column (count)
2539 "Delete the current column. With prefix, Deletes COUNT columns starting 2538 "Delete the current column.
2540from the current one." 2539With prefix, deletes COUNT columns starting from the current one."
2541 (interactive "*p") 2540 (interactive "*p")
2542 (ses-check-curcell) 2541 (ses-check-curcell)
2543 (or (> count 0) (signal 'args-out-of-range nil)) 2542 (or (> count 0) (signal 'args-out-of-range nil))
@@ -2611,7 +2610,7 @@ inserts a new row if at bottom of print area. Repeat COUNT times."
2611 (forward-char))) 2610 (forward-char)))
2612 2611
2613(defun ses-append-row-jump-first-column () 2612(defun ses-append-row-jump-first-column ()
2614 "Insert a new row after current one and jumps to its first column." 2613 "Insert a new row after current one and jump to its first column."
2615 (interactive "*") 2614 (interactive "*")
2616 (ses-check-curcell) 2615 (ses-check-curcell)
2617 (ses-begin-change) 2616 (ses-begin-change)
@@ -2714,8 +2713,8 @@ the corresponding data cell."
2714 line) 2713 line)
2715 2714
2716(defun ses-kill-override (beg end) 2715(defun ses-kill-override (beg end)
2717 "Generic override for any commands that kill text. We clear the killed 2716 "Generic override for any commands that kill text.
2718cells instead of deleting them." 2717We clear the killed cells instead of deleting them."
2719 (interactive "r") 2718 (interactive "r")
2720 (ses-check-curcell 'needrange) 2719 (ses-check-curcell 'needrange)
2721 ;; For some reason, the text-read-only error is not caught by `delete-region', 2720 ;; For some reason, the text-read-only error is not caught by `delete-region',
@@ -2776,9 +2775,9 @@ as symbols."
2776 2775
2777(defun ses-yank-pop (arg) 2776(defun ses-yank-pop (arg)
2778 "Replace just-yanked stretch of killed text with a different stretch. 2777 "Replace just-yanked stretch of killed text with a different stretch.
2779This command is allowed only immediately after a `yank' or a `yank-pop', when 2778This command is allowed only immediately after a `yank' or a `yank-pop',
2780the region contains a stretch of reinserted previously-killed text. We 2779when the region contains a stretch of reinserted previously-killed text.
2781replace it with a different stretch of killed text. 2780We replace it with a different stretch of killed text.
2782 Unlike standard `yank-pop', this function uses `undo' to delete the 2781 Unlike standard `yank-pop', this function uses `undo' to delete the
2783previous insertion." 2782previous insertion."
2784 (interactive "*p") 2783 (interactive "*p")
@@ -2792,7 +2791,7 @@ previous insertion."
2792 (setq this-command 'yank)) 2791 (setq this-command 'yank))
2793 2792
2794(defun ses-yank-cells (text arg) 2793(defun ses-yank-cells (text arg)
2795 "If the TEXT has a proper set of 'ses attributes, inserts the text as 2794 "If the TEXT has a proper set of 'ses attributes, insert the text as
2796cells, else return nil. The cells are reprinted--the supplied text is 2795cells, else return nil. The cells are reprinted--the supplied text is
2797ignored because the column widths, default printer, etc. at yank time might 2796ignored because the column widths, default printer, etc. at yank time might
2798be different from those at kill-time. ARG is a list to indicate that 2797be different from those at kill-time. ARG is a list to indicate that
@@ -2875,8 +2874,8 @@ cons of ROW and COL). Treat plain symbols as strings unless ARG is a list."
2875 (ses-cell-set-formula row col val)))) 2874 (ses-cell-set-formula row col val))))
2876 2875
2877(defun ses-yank-tsf (text arg) 2876(defun ses-yank-tsf (text arg)
2878 "If TEXT contains tabs and/or newlines, treats the tabs as 2877 "If TEXT contains tabs and/or newlines, treat the tabs as
2879column-separators and the newlines as row-separators and inserts the text as 2878column-separators and the newlines as row-separators and insert the text as
2880cell formulas--else return nil. Treat plain symbols as strings unless ARG 2879cell formulas--else return nil. Treat plain symbols as strings unless ARG
2881is a list. Ignore a final newline." 2880is a list. Ignore a final newline."
2882 (if (or (not (string-match "[\t\n]" text)) 2881 (if (or (not (string-match "[\t\n]" text))
@@ -2914,8 +2913,8 @@ is a list. Ignore a final newline."
2914 t))) 2913 t)))
2915 2914
2916(defun ses-yank-resize (needrows needcols) 2915(defun ses-yank-resize (needrows needcols)
2917 "If this yank will require inserting rows and/or columns, asks for 2916 "If this yank will require inserting rows and/or columns, ask for
2918confirmation and then inserts them. Result is (row,col) for top left of yank 2917confirmation and then insert them. Result is (row,col) for top left of yank
2919spot, or error signal if user requests cancel." 2918spot, or error signal if user requests cancel."
2920 (ses-begin-change) 2919 (ses-begin-change)
2921 (let ((rowcol (if ses--curcell 2920 (let ((rowcol (if ses--curcell
@@ -2958,9 +2957,9 @@ newlines between rows. Result is placed in kill ring."
2958 (ses-export-tab t)) 2957 (ses-export-tab t))
2959 2958
2960(defun ses-export-tab (want-formulas) 2959(defun ses-export-tab (want-formulas)
2961 "Export the current range with tabs between columns and newlines between 2960 "Export the current range with tabs between columns and newlines between rows.
2962rows. Result is placed in kill ring. The export is values unless 2961Result is placed in kill ring. The export is values unless WANT-FORMULAS
2963WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped." 2962is non-nil. Newlines and tabs in the export text are escaped."
2964 (ses-check-curcell 'needrange) 2963 (ses-check-curcell 'needrange)
2965 (let ((print-escape-newlines t) 2964 (let ((print-escape-newlines t)
2966 result item) 2965 result item)
@@ -3019,7 +3018,7 @@ The top row is row 1. Selecting row 0 displays the default header row."
3019 (ses-reset-header-string)) 3018 (ses-reset-header-string))
3020 3019
3021(defun ses-mark-row () 3020(defun ses-mark-row ()
3022 "Marks the entirety of current row as a range." 3021 "Mark the entirety of current row as a range."
3023 (interactive) 3022 (interactive)
3024 (ses-check-curcell 'range) 3023 (ses-check-curcell 'range)
3025 (let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))) 3024 (let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))))
@@ -3029,7 +3028,7 @@ The top row is row 1. Selecting row 0 displays the default header row."
3029 (ses-goto-print row 0))) 3028 (ses-goto-print row 0)))
3030 3029
3031(defun ses-mark-column () 3030(defun ses-mark-column ()
3032 "Marks the entirety of current column as a range." 3031 "Mark the entirety of current column as a range."
3033 (interactive) 3032 (interactive)
3034 (ses-check-curcell 'range) 3033 (ses-check-curcell 'range)
3035 (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))) 3034 (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))
@@ -3073,13 +3072,14 @@ The top row is row 1. Selecting row 0 displays the default header row."
3073 (ses-goto-print row col))))) 3072 (ses-goto-print row col)))))
3074 3073
3075(defun ses-renarrow-buffer () 3074(defun ses-renarrow-buffer ()
3076 "Narrow the buffer so only the print area is visible. Use after \\[widen]." 3075 "Narrow the buffer so only the print area is visible.
3076Use after \\[widen]."
3077 (interactive) 3077 (interactive)
3078 (setq ses--deferred-narrow t)) 3078 (setq ses--deferred-narrow t))
3079 3079
3080(defun ses-sort-column (sorter &optional reverse) 3080(defun ses-sort-column (sorter &optional reverse)
3081 "Sorts the range by a specified column. With prefix, sorts in 3081 "Sort the range by a specified column.
3082REVERSE order." 3082With prefix, sorts in REVERSE order."
3083 (interactive "*sSort column: \nP") 3083 (interactive "*sSort column: \nP")
3084 (ses-check-curcell 'needrange) 3084 (ses-check-curcell 'needrange)
3085 (let ((min (ses-sym-rowcol (car ses--curcell))) 3085 (let ((min (ses-sym-rowcol (car ses--curcell)))
@@ -3130,7 +3130,7 @@ REVERSE order."
3130 (ses-sort-column (ses-column-letter col) reverse)))) 3130 (ses-sort-column (ses-column-letter col) reverse))))
3131 3131
3132(defun ses-insert-range () 3132(defun ses-insert-range ()
3133 "Inserts into minibuffer the list of cells currently highlighted in the 3133 "Insert into minibuffer the list of cells currently highlighted in the
3134spreadsheet." 3134spreadsheet."
3135 (interactive "*") 3135 (interactive "*")
3136 (let (x) 3136 (let (x)
@@ -3142,7 +3142,7 @@ spreadsheet."
3142 (insert (substring (prin1-to-string (nreverse x)) 1 -1)))) 3142 (insert (substring (prin1-to-string (nreverse x)) 1 -1))))
3143 3143
3144(defun ses-insert-ses-range () 3144(defun ses-insert-ses-range ()
3145 "Inserts \"(ses-range x y)\" in the minibuffer to represent the currently 3145 "Insert \"(ses-range x y)\" in the minibuffer to represent the currently
3146highlighted range in the spreadsheet." 3146highlighted range in the spreadsheet."
3147 (interactive "*") 3147 (interactive "*")
3148 (let (x) 3148 (let (x)
@@ -3226,7 +3226,7 @@ highlighted range in the spreadsheet."
3226;;---------------------------------------------------------------------------- 3226;;----------------------------------------------------------------------------
3227 3227
3228(defun ses-safe-printer (printer) 3228(defun ses-safe-printer (printer)
3229 "Returns PRINTER if safe, or the substitute printer `ses-unsafe' otherwise." 3229 "Return PRINTER if safe, or the substitute printer `ses-unsafe' otherwise."
3230 (if (or (stringp printer) 3230 (if (or (stringp printer)
3231 (stringp (car-safe printer)) 3231 (stringp (car-safe printer))
3232 (not printer) 3232 (not printer)
@@ -3235,16 +3235,16 @@ highlighted range in the spreadsheet."
3235 'ses-unsafe)) 3235 'ses-unsafe))
3236 3236
3237(defun ses-safe-formula (formula) 3237(defun ses-safe-formula (formula)
3238 "Returns FORMULA if safe, or the substitute formula *unsafe* otherwise." 3238 "Return FORMULA if safe, or the substitute formula *unsafe* otherwise."
3239 (if (ses-warn-unsafe formula 'unsafep) 3239 (if (ses-warn-unsafe formula 'unsafep)
3240 formula 3240 formula
3241 `(ses-unsafe ',formula))) 3241 `(ses-unsafe ',formula)))
3242 3242
3243(defun ses-warn-unsafe (formula checker) 3243(defun ses-warn-unsafe (formula checker)
3244 "Applies CHECKER to FORMULA. If result is non-nil, asks user for 3244 "Apply CHECKER to FORMULA.
3245confirmation about FORMULA, which might be unsafe. Returns t if formula 3245If result is non-nil, asks user for confirmation about FORMULA,
3246is safe or user allows execution anyway. Always returns t if 3246which might be unsafe. Returns t if formula is safe or user allows
3247`safe-functions' is t." 3247execution anyway. Always returns t if `safe-functions' is t."
3248 (if (eq safe-functions t) 3248 (if (eq safe-functions t)
3249 t 3249 t
3250 (setq checker (funcall checker formula)) 3250 (setq checker (funcall checker formula))
@@ -3259,13 +3259,13 @@ is safe or user allows execution anyway. Always returns t if
3259;;---------------------------------------------------------------------------- 3259;;----------------------------------------------------------------------------
3260 3260
3261(defun ses--clean-! (&rest x) 3261(defun ses--clean-! (&rest x)
3262 "Clean by delq list X from any occurrence of `nil' or `*skip*'." 3262 "Clean by `delq' list X from any occurrence of `nil' or `*skip*'."
3263 (delq nil (delq '*skip* x))) 3263 (delq nil (delq '*skip* x)))
3264 3264
3265(defun ses--clean-_ (x y) 3265(defun ses--clean-_ (x y)
3266 "Clean list X by replacing by Y any occurrence of `nil' or `*skip*'. 3266 "Clean list X by replacing by Y any occurrence of `nil' or `*skip*'.
3267 3267
3268This will change X by making setcar on its cons cells." 3268This will change X by making `setcar' on its cons cells."
3269 (let ((ret x) ret-elt) 3269 (let ((ret x) ret-elt)
3270 (while ret 3270 (while ret
3271 (setq ret-elt (car ret)) 3271 (setq ret-elt (car ret))
@@ -3275,7 +3275,7 @@ This will change X by making setcar on its cons cells."
3275 x) 3275 x)
3276 3276
3277(defmacro ses-range (from to &rest rest) 3277(defmacro ses-range (from to &rest rest)
3278 "Expands to a list of cell-symbols for the range going from 3278 "Expand to a list of cell-symbols for the range going from
3279FROM up to TO. The range automatically expands to include any 3279FROM up to TO. The range automatically expands to include any
3280new row or column inserted into its middle. The SES library code 3280new row or column inserted into its middle. The SES library code
3281specifically looks for the symbol `ses-range', so don't create an 3281specifically looks for the symbol `ses-range', so don't create an
@@ -3288,8 +3288,8 @@ In the sequel we assume that cells A1, B1, A2 B2 have respective values
32881 2 3 and 4. 32881 2 3 and 4.
3289 3289
3290Readout direction is specified by a `>v', '`>^', `<v', `<^', 3290Readout direction is specified by a `>v', '`>^', `<v', `<^',
3291`v>', `v<', `^>', `^<' flag. For historical reasons, in absence 3291`v>', `v<', `^>', `^<' flag. For historical reasons, in absence
3292of such a flag, a default direction of `^<' is assumed. This 3292of such a flag, a default direction of `^<' is assumed. This
3293way `(ses-range A1 B2 ^>)' will evaluate to `(1 3 2 4)', 3293way `(ses-range A1 B2 ^>)' will evaluate to `(1 3 2 4)',
3294while `(ses-range A1 B2 >^)' will evaluate to (3 4 1 2). 3294while `(ses-range A1 B2 >^)' will evaluate to (3 4 1 2).
3295 3295
@@ -3302,18 +3302,18 @@ If the range is one column, then `v' can be used as a shorthand to
3302A `!' flag will remove all cells whose value is nil or `*skip*'. 3302A `!' flag will remove all cells whose value is nil or `*skip*'.
3303 3303
3304A `_' flag will replace nil or `*skip*' by the value following 3304A `_' flag will replace nil or `*skip*' by the value following
3305the `_' flag. If the `_' flag is the last argument, then they are 3305the `_' flag. If the `_' flag is the last argument, then they are
3306replaced by integer 0. 3306replaced by integer 0.
3307 3307
3308A `*', `*1' or `*2' flag will vectorize the range in the sense of 3308A `*', `*1' or `*2' flag will vectorize the range in the sense of
3309Calc. See info node `(Calc) Top'. Flag `*' will output either a 3309Calc. See info node `(Calc) Top'. Flag `*' will output either a
3310vector or a matrix depending on the number of rows, `*1' will 3310vector or a matrix depending on the number of rows, `*1' will
3311flatten the result to a one row vector, and `*2' will make a 3311flatten the result to a one row vector, and `*2' will make a
3312matrix whatever the number of rows. 3312matrix whatever the number of rows.
3313 3313
3314Warning: interaction with Calc is experimental and may produce 3314Warning: interaction with Calc is experimental and may produce
3315confusing results if you are not aware of Calc data format. Use 3315confusing results if you are not aware of Calc data format.
3316`math-format-value' as a printer for Calc objects." 3316Use `math-format-value' as a printer for Calc objects."
3317 (let (result-row 3317 (let (result-row
3318 result 3318 result
3319 (prev-row -1) 3319 (prev-row -1)
@@ -3400,10 +3400,10 @@ are ignored. Result is always floating-point, even if all args are integers."
3400 (/ (float (apply '+ list)) (length list))) 3400 (/ (float (apply '+ list)) (length list)))
3401 3401
3402(defmacro ses-select (fromrange test torange) 3402(defmacro ses-select (fromrange test torange)
3403 "Select cells in FROMRANGE that are `equal' to TEST. For each match, return 3403 "Select cells in FROMRANGE that are `equal' to TEST.
3404the corresponding cell from TORANGE. The ranges are macroexpanded but not 3404For each match, return the corresponding cell from TORANGE.
3405evaluated so they should be either (ses-range BEG END) or (list ...). The 3405The ranges are macroexpanded but not evaluated so they should be
3406TEST is evaluated." 3406either (ses-range BEG END) or (list ...). The TEST is evaluated."
3407 (setq fromrange (cdr (macroexpand fromrange)) 3407 (setq fromrange (cdr (macroexpand fromrange))
3408 torange (cdr (macroexpand torange)) 3408 torange (cdr (macroexpand torange))
3409 test (eval test)) 3409 test (eval test))
@@ -3433,9 +3433,10 @@ TEST is evaluated."
3433(defvar col) 3433(defvar col)
3434 3434
3435(defun ses-center (value &optional span fill) 3435(defun ses-center (value &optional span fill)
3436 "Print VALUE, centered within column. FILL is the fill character for 3436 "Print VALUE, centered within column.
3437centering (default = space). SPAN indicates how many additional rightward 3437FILL is the fill character for centering (default = space).
3438columns to include in width (default = 0)." 3438SPAN indicates how many additional rightward columns to include
3439in width (default = 0)."
3439 (let ((printer (or (ses-col-printer col) ses--default-printer)) 3440 (let ((printer (or (ses-col-printer col) ses--default-printer))
3440 (width (ses-col-width col)) 3441 (width (ses-col-width col))
3441 half) 3442 half)
@@ -3454,8 +3455,8 @@ columns to include in width (default = 0)."
3454 3455
3455(defun ses-center-span (value &optional fill) 3456(defun ses-center-span (value &optional fill)
3456 "Print VALUE, centered within the span that starts in the current column 3457 "Print VALUE, centered within the span that starts in the current column
3457and continues until the next nonblank column. FILL specifies the fill 3458and continues until the next nonblank column.
3458character (default = space)." 3459FILL specifies the fill character (default = space)."
3459 (let ((end (1+ col))) 3460 (let ((end (1+ col)))
3460 (while (and (< end ses--numcols) 3461 (while (and (< end ses--numcols)
3461 (memq (ses-cell-value row end) '(nil *skip*))) 3462 (memq (ses-cell-value row end) '(nil *skip*)))
@@ -3463,8 +3464,8 @@ character (default = space)."
3463 (ses-center value (- end col 1) fill))) 3464 (ses-center value (- end col 1) fill)))
3464 3465
3465(defun ses-dashfill (value &optional span) 3466(defun ses-dashfill (value &optional span)
3466 "Print VALUE centered using dashes. SPAN indicates how many rightward 3467 "Print VALUE centered using dashes.
3467columns to include in width (default = 0)." 3468SPAN indicates how many rightward columns to include in width (default = 0)."
3468 (ses-center value span ?-)) 3469 (ses-center value span ?-))
3469 3470
3470(defun ses-dashfill-span (value) 3471(defun ses-dashfill-span (value)
@@ -3478,7 +3479,7 @@ current column and continues until the next nonblank column."
3478 (ses-center-span value ?~)) 3479 (ses-center-span value ?~))
3479 3480
3480(defun ses-unsafe (value) 3481(defun ses-unsafe (value)
3481 "Substitute for an unsafe formula or printer" 3482 "Substitute for an unsafe formula or printer."
3482 (error "Unsafe formula or printer")) 3483 (error "Unsafe formula or printer"))
3483 3484
3484;;All standard printers are safe, including ses-unsafe! 3485;;All standard printers are safe, including ses-unsafe!