diff options
| author | Stefan Monnier | 2010-09-20 23:45:09 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-09-20 23:45:09 +0200 |
| commit | 984edd2215e74d54d387c7e8fa2fd14ee43ff5f0 (patch) | |
| tree | bc55cb3a94eb5ec4cf7e4d17bb0eacf2390f8e3f /lisp | |
| parent | 3672149f83cf8c99f0d100f1a6e4419360b0fa43 (diff) | |
| download | emacs-984edd2215e74d54d387c7e8fa2fd14ee43ff5f0.tar.gz 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')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 12 | ||||
| -rw-r--r-- | lisp/simple.el | 7 |
3 files changed, 16 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dadc344e9fc..96c953452fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2010-09-20 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2010-09-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * emacs-lisp/lisp.el (up-list): Don't do nothing silently. | ||
| 4 | |||
| 5 | * simple.el (blink-matching-open): Use syntax-class. | ||
| 6 | |||
| 3 | * progmodes/pascal.el (pascal-mode): Use define-derived-mode. | 7 | * progmodes/pascal.el (pascal-mode): Use define-derived-mode. |
| 4 | Set invisibility spec for pascal's outline mode. | 8 | Set invisibility spec for pascal's outline mode. |
| 5 | (pascal-outline-change): Clean up calling convention. | 9 | (pascal-outline-change): Clean up calling convention. |
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. | |||
| 141 | This command assumes point is not in a string or comment." | 141 | This command assumes point is not in a string or comment." |
| 142 | (interactive "^p") | 142 | (interactive "^p") |
| 143 | (or arg (setq arg 1)) | 143 | (or arg (setq arg 1)) |
| 144 | (let ((inc (if (> arg 0) 1 -1))) | 144 | (let ((inc (if (> arg 0) 1 -1)) |
| 145 | pos) | ||
| 145 | (while (/= arg 0) | 146 | (while (/= arg 0) |
| 146 | (if forward-sexp-function | 147 | (if (null forward-sexp-function) |
| 148 | (goto-char (or (scan-lists (point) inc 1) (buffer-end arg))) | ||
| 147 | (condition-case err | 149 | (condition-case err |
| 148 | (while (let ((pos (point))) | 150 | (while (progn (setq pos (point)) |
| 149 | (forward-sexp inc) | 151 | (forward-sexp inc) |
| 150 | (/= (point) pos))) | 152 | (/= (point) pos))) |
| 151 | (scan-error (goto-char (nth 2 err)))) | 153 | (scan-error (goto-char (nth 2 err)))) |
| 152 | (goto-char (or (scan-lists (point) inc 1) (buffer-end arg)))) | 154 | (if (= (point) pos) |
| 155 | (signal 'scan-error | ||
| 156 | (list "Unbalanced parentheses" (point) (point))))) | ||
| 153 | (setq arg (- arg inc))))) | 157 | (setq arg (- arg inc))))) |
| 154 | 158 | ||
| 155 | (defun kill-sexp (&optional arg) | 159 | (defun kill-sexp (&optional arg) |
diff --git a/lisp/simple.el b/lisp/simple.el index 1ab737d5ec1..ca20a57ec9c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5525,9 +5525,10 @@ The function should return non-nil if the two tokens do not match.") | |||
| 5525 | ;; backward-sexp skips backward over prefix chars, | 5525 | ;; backward-sexp skips backward over prefix chars, |
| 5526 | ;; so move back to the matching paren. | 5526 | ;; so move back to the matching paren. |
| 5527 | (while (and (< (point) (1- oldpos)) | 5527 | (while (and (< (point) (1- oldpos)) |
| 5528 | (let ((code (car (syntax-after (point))))) | 5528 | (let ((code (syntax-after (point)))) |
| 5529 | (or (eq (logand 65536 code) 6) | 5529 | (or (eq (syntax-class code) 6) |
| 5530 | (eq (logand 1048576 code) 1048576)))) | 5530 | (eq (logand 1048576 (car code)) |
| 5531 | 1048576)))) | ||
| 5531 | (forward-char 1)) | 5532 | (forward-char 1)) |
| 5532 | (point)) | 5533 | (point)) |
| 5533 | (error nil)))))) | 5534 | (error nil)))))) |