diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-08-17 22:18:40 +0200 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-08-17 22:18:40 +0200 |
commit | afa22f7ce71a818dd61cf3dc4c21b0c01b2e63fe (patch) | |
tree | 0f1d7c5d9825254651f60723553e2efd18728090 /lisp/emacs-lisp/lisp.el | |
parent | 0cc5642708811f2a2e19fe87072e1076837abf99 (diff) | |
download | emacs-afa22f7ce71a818dd61cf3dc4c21b0c01b2e63fe.tar.gz |
* lisp/emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set.
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 4ef6dab8968..c728abab496 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -142,7 +142,13 @@ This command assumes point is not in a string or comment." (or arg (setq arg 1)) (let ((inc (if (> arg 0) 1 -1))) (while (/= arg 0) - (goto-char (or (scan-lists (point) inc 1) (buffer-end arg))) + (if forward-sexp-function + (condition-case err + (while (let ((pos (point))) + (forward-sexp inc) + (/= (point) pos))) + (scan-error (goto-char (nth 2 err)))) + (goto-char (or (scan-lists (point) inc 1) (buffer-end arg)))) (setq arg (- arg inc))))) (defun kill-sexp (&optional arg) |