# HG changeset patch # User Stefan Monnier # Date 1282076320 -7200 # Node ID 7a3c2a9899003f7ad4f74c1535017d3dfe3b1d2f # Parent 0710ff9a8063ade3f2a20ffbad816d16bda53821 * lisp/emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set. diff -r 0710ff9a8063 -r 7a3c2a989900 lisp/ChangeLog --- 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 + * 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. diff -r 0710ff9a8063 -r 7a3c2a989900 lisp/emacs-lisp/lisp.el --- 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)