aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/misc/ses.texi7
-rw-r--r--lisp/ses.el9
2 files changed, 10 insertions, 6 deletions
diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi
index c43ddf472a4..1f951de239f 100644
--- a/doc/misc/ses.texi
+++ b/doc/misc/ses.texi
@@ -188,8 +188,8 @@ the end-points, e.g.:
188@emph{list} of values. This allows for more complex possibilities.) 188@emph{list} of values. This allows for more complex possibilities.)
189 189
190Alternatively you can use the @code{!} modifier of @code{ses-range} to 190Alternatively you can use the @code{!} modifier of @code{ses-range} to
191remove blank cells which allows to use @code{+} instead of 191remove blank cells from the returned list, which allows to use
192@code{ses+}: 192@code{+} instead of @code{ses+}:
193 193
194@lisp 194@lisp
195(apply '+ (ses-range A2 A5 !)) 195(apply '+ (ses-range A2 A5 !))
@@ -1020,7 +1020,8 @@ this to undo the effect of @kbd{t}.
1020@end table 1020@end table
1021 1021
1022When a printer function signals an error, the fallback printer 1022When a printer function signals an error, the fallback printer
1023@samp{"%S"} is substituted. This is useful when your column printer 1023@findex ses-prin1
1024@code{ses-prin1} is substituted. This is useful when your column printer
1024is numeric-only and you use a string as a cell value. Note that the 1025is numeric-only and you use a string as a cell value. Note that the
1025standard default printer is @samp{"%.7g"} which is numeric-only, so cells 1026standard default printer is @samp{"%.7g"} which is numeric-only, so cells
1026that are empty of contain strings will use the fallback printer. 1027that are empty of contain strings will use the fallback printer.
diff --git a/lisp/ses.el b/lisp/ses.el
index 9abbd6dd2ca..c80415e1e15 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -565,11 +565,14 @@ definition."
565 (cond 565 (cond
566 ((functionp printer) printer) 566 ((functionp printer) printer)
567 ((stringp printer) 567 ((stringp printer)
568 `(lambda (x) (format ,printer x))) 568 `(lambda (x)
569 (if (null x) ""
570 (format ,printer x))))
569 ((stringp (car-safe printer)) 571 ((stringp (car-safe printer))
570 `(lambda (x) 572 `(lambda (x)
571 (setq ses-call-printer-return t) 573 (if (null x) ""
572 (format ,(car printer) x))) 574 (setq ses-call-printer-return t)
575 (format ,(car printer) x))))
573 (t (error "Invalid printer %S" printer)))) 576 (t (error "Invalid printer %S" printer))))
574 577
575(defun ses--local-printer (name def) 578(defun ses--local-printer (name def)