aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii2015-04-05 20:18:19 +0300
committerEli Zaretskii2015-04-05 20:18:19 +0300
commitba0a6e9f280968994fd7fc5a1425dec46a5b4e71 (patch)
treea9d0cfbb2c11290b07d3fe378ed403c2fe1928ca /lisp
parentc1d18b1d59ef3f0d01c8a1112976241feba2f74a (diff)
downloademacs-ba0a6e9f280968994fd7fc5a1425dec46a5b4e71.tar.gz
emacs-ba0a6e9f280968994fd7fc5a1425dec46a5b4e71.zip
Fix byte-compilation warning in lisp/ses.el
lisp/ses.el (ses-sym-rowcol): Move up, before the first use, to avoid byte-compiler warnings.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/ses.el16
2 files changed, 13 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a780b08e49c..8ea7f4a3cc8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12015-04-05 Eli Zaretskii <eliz@gnu.org>
2
3 * ses.el (ses-sym-rowcol): Move up, before the first use, to avoid
4 byte-compiler warnings.
5
12015-04-05 Alan Mackenzie <acm@muc.de> 62015-04-05 Alan Mackenzie <acm@muc.de>
2 7
3 * jit-lock.el (jit-lock-after-change): Widen the buffer only 8 * jit-lock.el (jit-lock-after-change): Widen the buffer only
diff --git a/lisp/ses.el b/lisp/ses.el
index f42b61c20e7..a501435a24f 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -418,6 +418,14 @@ functions refer to its value."
418 (declare (debug t)) 418 (declare (debug t))
419 `(ses-cell--references ,(if col `(ses-get-cell ,row ,col) row))) 419 `(ses-cell--references ,(if col `(ses-get-cell ,row ,col) row)))
420 420
421(defmacro ses-sym-rowcol (sym)
422 "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result
423is nil if SYM is not a symbol that names a cell."
424 `(let ((rc (and (symbolp ,sym) (get ,sym 'ses-cell))))
425 (if (eq rc :ses-named)
426 (gethash ,sym ses--named-cell-hashmap)
427 rc)))
428
421(defun ses-cell-p (cell) 429(defun ses-cell-p (cell)
422 "Return non-nil if CELL is a cell of current buffer." 430 "Return non-nil if CELL is a cell of current buffer."
423 (and (vectorp cell) 431 (and (vectorp cell)
@@ -467,14 +475,6 @@ the corresponding cell with name PROPERTY-NAME."
467 "Return the default printer for column COL." 475 "Return the default printer for column COL."
468 `(aref ses--col-printers ,col)) 476 `(aref ses--col-printers ,col))
469 477
470(defmacro ses-sym-rowcol (sym)
471 "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result
472is nil if SYM is not a symbol that names a cell."
473 `(let ((rc (and (symbolp ,sym) (get ,sym 'ses-cell))))
474 (if (eq rc :ses-named)
475 (gethash ,sym ses--named-cell-hashmap)
476 rc)))
477
478(defun ses-is-cell-sym-p (sym) 478(defun ses-is-cell-sym-p (sym)
479 "Check whether SYM point at a cell of this spread sheet." 479 "Check whether SYM point at a cell of this spread sheet."
480 (let ((rowcol (get sym 'ses-cell))) 480 (let ((rowcol (get sym 'ses-cell)))