From: Eli Zaretskii Date: Sun, 5 Apr 2015 17:18:19 +0000 (+0300) Subject: Fix byte-compilation warning in lisp/ses.el X-Git-Tag: emacs-25.0.90~2559 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba0a6e9f280968994fd7fc5a1425dec46a5b4e71;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a780b08e49c..8ea7f4a3cc8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-04-05 Eli Zaretskii + + * ses.el (ses-sym-rowcol): Move up, before the first use, to avoid + byte-compiler warnings. + 2015-04-05 Alan Mackenzie * 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." (declare (debug t)) `(ses-cell--references ,(if col `(ses-get-cell ,row ,col) row))) +(defmacro ses-sym-rowcol (sym) + "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result +is nil if SYM is not a symbol that names a cell." + `(let ((rc (and (symbolp ,sym) (get ,sym 'ses-cell)))) + (if (eq rc :ses-named) + (gethash ,sym ses--named-cell-hashmap) + rc))) + (defun ses-cell-p (cell) "Return non-nil if CELL is a cell of current buffer." (and (vectorp cell) @@ -467,14 +475,6 @@ the corresponding cell with name PROPERTY-NAME." "Return the default printer for column COL." `(aref ses--col-printers ,col)) -(defmacro ses-sym-rowcol (sym) - "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result -is nil if SYM is not a symbol that names a cell." - `(let ((rc (and (symbolp ,sym) (get ,sym 'ses-cell)))) - (if (eq rc :ses-named) - (gethash ,sym ses--named-cell-hashmap) - rc))) - (defun ses-is-cell-sym-p (sym) "Check whether SYM point at a cell of this spread sheet." (let ((rowcol (get sym 'ses-cell)))