diff options
| author | Stefan Monnier | 2010-08-17 22:18:40 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-08-17 22:18:40 +0200 |
| commit | afa22f7ce71a818dd61cf3dc4c21b0c01b2e63fe (patch) | |
| tree | 0f1d7c5d9825254651f60723553e2efd18728090 | |
| parent | 0cc5642708811f2a2e19fe87072e1076837abf99 (diff) | |
| download | emacs-afa22f7ce71a818dd61cf3dc4c21b0c01b2e63fe.tar.gz emacs-afa22f7ce71a818dd61cf3dc4c21b0c01b2e63fe.zip | |
* lisp/emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db60b546e6d..2803ec0a488 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2010-08-17 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2010-08-17 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set. | ||
| 4 | |||
| 3 | Font-lock '...' strings, plus various simplifications and fixes. | 5 | Font-lock '...' strings, plus various simplifications and fixes. |
| 4 | * progmodes/octave-mod.el (octave-font-lock-keywords): Use regexp-opt. | 6 | * progmodes/octave-mod.el (octave-font-lock-keywords): Use regexp-opt. |
| 5 | (octave-font-lock-close-quotes): New function. | 7 | (octave-font-lock-close-quotes): New function. |
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." | |||
| 142 | (or arg (setq arg 1)) | 142 | (or arg (setq arg 1)) |
| 143 | (let ((inc (if (> arg 0) 1 -1))) | 143 | (let ((inc (if (> arg 0) 1 -1))) |
| 144 | (while (/= arg 0) | 144 | (while (/= arg 0) |
| 145 | (goto-char (or (scan-lists (point) inc 1) (buffer-end arg))) | 145 | (if forward-sexp-function |
| 146 | (condition-case err | ||
| 147 | (while (let ((pos (point))) | ||
| 148 | (forward-sexp inc) | ||
| 149 | (/= (point) pos))) | ||
| 150 | (scan-error (goto-char (nth 2 err)))) | ||
| 151 | (goto-char (or (scan-lists (point) inc 1) (buffer-end arg)))) | ||
| 146 | (setq arg (- arg inc))))) | 152 | (setq arg (- arg inc))))) |
| 147 | 153 | ||
| 148 | (defun kill-sexp (&optional arg) | 154 | (defun kill-sexp (&optional arg) |