Function: ses-select
ses-select is a macro defined in ses.el.gz.
Signature
(ses-select FROMRANGE TEST TORANGE)
Documentation
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.
Source Code
;; Defined in /usr/src/emacs/lisp/ses.el.gz
(defmacro ses-select (fromrange test torange)
"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."
(setq fromrange (cdr (macroexpand fromrange))
torange (cdr (macroexpand torange))
test (eval test t))
(or (= (length fromrange) (length torange))
(error "ses-select: Ranges not same length"))
(let (result)
(dolist (x fromrange)
(if (equal test (symbol-value x))
(push (car torange) result))
(setq torange (cdr torange)))
(cons 'list result)))