mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Run ses-after-entry-functions with run-hook-with-args.
* lisp/ses.el (ses-after-entry-functions): Indicate that `ses--row' and `ses--col' are dynamically bound while hook is run. (ses-read-cell, ses-read-symbol): Use `run-hook-with-args' rather than `dolist'+`funcall' to run hook `ses-after-entry-functions'.
This commit is contained in:
parent
699105ed3f
commit
e70a8c9e6f
1 changed files with 5 additions and 5 deletions
10
lisp/ses.el
10
lisp/ses.el
|
|
@ -101,7 +101,9 @@
|
|||
(defcustom ses-after-entry-functions '(forward-char)
|
||||
"Things to do after entering a value into a cell.
|
||||
An abnormal hook that usually runs a cursor-movement function.
|
||||
Each function is called with ARG=1."
|
||||
Each function is called with ARG=1.
|
||||
Variables `ses--row' and `ses--col' are dynamically bound to cell
|
||||
coordinates during hook call."
|
||||
:type 'hook
|
||||
:options '(forward-char backward-char next-line previous-line))
|
||||
|
||||
|
|
@ -2588,8 +2590,7 @@ Return nil if cell formula was unsafe and user declined confirmation."
|
|||
(ses-command-hook) ; Update cell widths before movement.
|
||||
(let ((ses--row row)
|
||||
(ses--col col))
|
||||
(dolist (x ses-after-entry-functions)
|
||||
(funcall x 1)))))
|
||||
(run-hook-with-args 'ses-after-entry-functions 1))))
|
||||
|
||||
(defun ses-read-symbol (row col symb)
|
||||
"Self-insert for a symbol as a cell formula.
|
||||
|
|
@ -2610,8 +2611,7 @@ spreadsheet is available for completions."
|
|||
(ses-command-hook) ; Update cell widths before movement.
|
||||
(let ((ses--row row)
|
||||
(ses--col col))
|
||||
(dolist (x ses-after-entry-functions)
|
||||
(funcall x 1)))))
|
||||
(run-hook-with-args 'ses-after-entry-functions 1))))
|
||||
|
||||
(defun ses-clear-cell-forward (count)
|
||||
"Delete formula and printer for current cell and then move to next cell.
|
||||
|
|
|
|||
Loading…
Reference in a new issue