Function: ses--curcell
ses--curcell is a byte-compiled function defined in ses.el.gz.
Signature
(ses--curcell &optional POS)
Documentation
Return the current cell symbol, or a cons (BEG,END) for a region, or nil if cursor is not at a cell.
Source Code
;; Defined in /usr/src/emacs/lisp/ses.el.gz
(defun ses--curcell (&optional pos)
"Return the current cell symbol, or a cons (BEG,END) for a
region, or nil if cursor is not at a cell."
(unless pos (setq pos (point)))
(if (or (not mark-active)
deactivate-mark
(= pos (mark t)))
;; Single cell.
(ses--cell-at-pos pos)
;; Range.
(let* ((re (max pos (mark t)))
(bcell (ses--cell-at-pos (min pos (mark t))))
(ecell (ses--cell-at-pos (1- re))))
(when (= re ses--data-marker)
;; Correct for overflow.
(setq ecell (ses--cell-at-pos (- (region-end) 2))))
(if (and bcell ecell)
(cons bcell ecell)
nil))))