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.
This commit is contained in:
Eli Zaretskii 2015-04-05 20:18:19 +03:00
parent c1d18b1d59
commit ba0a6e9f28
2 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2015-04-05 Eli Zaretskii <eliz@gnu.org>
* ses.el (ses-sym-rowcol): Move up, before the first use, to avoid
byte-compiler warnings.
2015-04-05 Alan Mackenzie <acm@muc.de>
* jit-lock.el (jit-lock-after-change): Widen the buffer only

View file

@ -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)))