diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-09-20 23:45:09 +0200 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-09-20 23:45:09 +0200 |
commit | 984edd2215e74d54d387c7e8fa2fd14ee43ff5f0 (patch) | |
tree | bc55cb3a94eb5ec4cf7e4d17bb0eacf2390f8e3f /lisp/emacs-lisp | |
parent | 3672149f83cf8c99f0d100f1a6e4419360b0fa43 (diff) | |
download | emacs-984edd2215e74d54d387c7e8fa2fd14ee43ff5f0.tar.gz emacs-984edd2215e74d54d387c7e8fa2fd14ee43ff5f0.tar.bz2 emacs-984edd2215e74d54d387c7e8fa2fd14ee43ff5f0.zip |
* lisp/simple.el (blink-matching-open): Use syntax-class.
* lisp/emacs-lisp/lisp.el (up-list): Don't do nothing silently.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index e799dcd77c1..cfb56eb3232 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -141,15 +141,19 @@ A negative argument means move backward but still to a less deep spot. This command assumes point is not in a string or comment." (interactive "^p") (or arg (setq arg 1)) - (let ((inc (if (> arg 0) 1 -1))) + (let ((inc (if (> arg 0) 1 -1)) + pos) (while (/= arg 0) - (if forward-sexp-function + (if (null forward-sexp-function) + (goto-char (or (scan-lists (point) inc 1) (buffer-end arg))) (condition-case err - (while (let ((pos (point))) + (while (progn (setq 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)))) + (if (= (point) pos) + (signal 'scan-error + (list "Unbalanced parentheses" (point) (point))))) (setq arg (- arg inc))))) (defun kill-sexp (&optional arg) |