* lisp/emacs-lisp/lisp.el (forward-sexp-function): Set back to nil.

(forward-sexp): Revert back to checking 'forward-sexp-function'
for nil (bug#70426).
This commit is contained in:
Juri Linkov 2024-04-17 09:53:02 +03:00
parent a33ab7565e
commit ada429c375
3 changed files with 5 additions and 9 deletions

View file

@ -50,7 +50,7 @@ This affects `insert-parentheses' and `insert-pair'."
(goto-char (or (scan-sexps (point) arg) (buffer-end arg)))
(if (< arg 0) (backward-prefix-chars)))
(defvar forward-sexp-function #'forward-sexp-default-function
(defvar forward-sexp-function nil
;; FIXME:
;; - for some uses, we may want a "sexp-only" version, which only
;; jumps over a well-formed sexp, rather than some dwimish thing
@ -79,9 +79,9 @@ report errors as appropriate for this kind of usage."
"No next sexp"
"No previous sexp"))))
(or arg (setq arg 1))
(funcall (or forward-sexp-function
#'forward-sexp-default-function)
arg)))
(if forward-sexp-function
(funcall forward-sexp-function arg)
(forward-sexp-default-function arg))))
(defun backward-sexp (&optional arg interactive)
"Move backward across one balanced expression (sexp).