diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-09-13 16:40:48 +0200 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-09-13 16:40:48 +0200 |
commit | cc390e46c7ba95b76ea133d98fd386214cd01709 (patch) | |
tree | ead4400d22bd07214b782ff7e46e79d473fac419 /lisp/emacs-lisp/lisp.el | |
parent | c566235d981eba73c88bbff00b6a1d88360b6e9f (diff) | |
parent | c5fe4acb5fb456d6e8e147d8bc7981ce56c5c03d (diff) | |
download | emacs-cc390e46c7ba95b76ea133d98fd386214cd01709.tar.gz emacs-cc390e46c7ba95b76ea133d98fd386214cd01709.tar.bz2 emacs-cc390e46c7ba95b76ea133d98fd386214cd01709.zip |
Merge from trunk
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 4ef6dab8968..e799dcd77c1 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -5,6 +5,7 @@ ;; Maintainer: FSF ;; Keywords: lisp, languages +;; Package: emacs ;; This file is part of GNU Emacs. @@ -142,7 +143,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) |