Function: ses-end-of-line
ses-end-of-line is an interactive and byte-compiled function defined
in ses.el.gz.
Signature
(ses-end-of-line)
Documentation
Move point to last cell on line.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/ses.el.gz
(defun ses-end-of-line ()
"Move point to last cell on line."
(interactive)
(ses-check-curcell 'end 'range)
(when ses--curcell ; Otherwise we're at the bottom row, which is empty
; anyway.
(let ((col (1- ses--numcols))
row rowcol)
(if (symbolp ses--curcell)
;; Single cell.
(setq row (car (ses-sym-rowcol ses--curcell)))
;; Range --- use whichever end of the range the point is at.
(setq rowcol (ses-sym-rowcol (if (< (point) (mark))
(car ses--curcell)
(cdr ses--curcell))))
;; If range already includes the last cell in a row, point is actually
;; in the following row.
(if (<= (cdr rowcol) (1- col))
(setq row (car rowcol))
(setq row (1+ (car rowcol)))
(if (= row ses--numrows)
;;Already at end - can't go anywhere
(setq col 0))))
(when (< row ses--numrows) ; Otherwise it's a range that includes last cell.
(while (eq (ses-cell-value row col) '*skip*)
;; Back to beginning of multi-column cell.
(setq col (1- col)))
(ses-goto-print row col)))))