mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
(forward-list-function): Give it a default value
* lisp/emacs-lisp/lisp.el (forward-list-function): Give it a default value. (forward-list): Simplify.
This commit is contained in:
parent
1644463e5b
commit
b456ffc994
1 changed files with 4 additions and 4 deletions
|
|
@ -147,7 +147,7 @@ This command assumes point is not in a string or comment."
|
|||
"Default function for `forward-list-function'."
|
||||
(goto-char (or (scan-lists (point) arg 0) (buffer-end arg))))
|
||||
|
||||
(defvar forward-list-function nil
|
||||
(defvar forward-list-function #'forward-list-default-function
|
||||
"If non-nil, `forward-list' delegates to this function.
|
||||
Should take the same arguments and behave similarly to `forward-list'.")
|
||||
|
||||
|
|
@ -169,9 +169,9 @@ report errors as appropriate for this kind of usage."
|
|||
"No next group"
|
||||
"No previous group"))))
|
||||
(or arg (setq arg 1))
|
||||
(if forward-list-function
|
||||
(funcall forward-list-function arg)
|
||||
(forward-list-default-function arg))))
|
||||
(funcall (or forward-list-function
|
||||
#'forward-list-default-function)
|
||||
arg)))
|
||||
|
||||
(defun backward-list (&optional arg interactive)
|
||||
"Move backward across one balanced group of parentheses.
|
||||
|
|
|
|||
Loading…
Reference in a new issue