Function: ses-read-cell-printer
ses-read-cell-printer is an interactive and byte-compiled function
defined in ses.el.gz.
Signature
(ses-read-cell-printer NEWVAL)
Documentation
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).
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/ses.el.gz
(defun ses-read-cell-printer (newval)
"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)."
(interactive
(let ((default t))
(ses-check-curcell 'range)
;;Default is none if not all cells in range have same printer
(catch 'ses-read-cell-printer
(ses-dorange ses--curcell
(let ((x (ses-cell-printer row col)))
(if (eq (car-safe x) 'ses-safe-printer)
(setq x (cadr x)))
(if (eq default t)
(setq default x)
(unless (equal default x)
;;Range contains differing printer functions
(setq default t)
(throw 'ses-read-cell-printer t))))))
(list (ses-read-printer (format "Cell %S printer" ses--curcell)
default))))
(unless (eq newval t)
(ses-begin-change)
(ses-dorange ses--curcell
(ses-set-cell row col 'printer newval)
(ses-print-cell row col))))