Mercurial > emacs
changeset 109819:7a3c2a989900
* lisp/emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 17 Aug 2010 22:18:40 +0200 |
parents | 0710ff9a8063 |
children | 33724382fa3f |
files | lisp/ChangeLog lisp/emacs-lisp/lisp.el |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Aug 17 23:05:50 2010 +0300 +++ b/lisp/ChangeLog Tue Aug 17 22:18:40 2010 +0200 @@ -1,5 +1,7 @@ 2010-08-17 Stefan Monnier <monnier@iro.umontreal.ca> + * emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set. + Font-lock '...' strings, plus various simplifications and fixes. * progmodes/octave-mod.el (octave-font-lock-keywords): Use regexp-opt. (octave-font-lock-close-quotes): New function.
--- a/lisp/emacs-lisp/lisp.el Tue Aug 17 23:05:50 2010 +0300 +++ b/lisp/emacs-lisp/lisp.el Tue Aug 17 22:18:40 2010 +0200 @@ -142,7 +142,13 @@ (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)