diff options
| author | Martin Rudalics | 2007-09-15 09:37:00 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2007-09-15 09:37:00 +0000 |
| commit | 29100cfa0ea33588ee7b48d33858c97fb19c1767 (patch) | |
| tree | b39ad7f08621df3a08710674be03928fa9e79679 | |
| parent | 9558a54ac728e667d1ed41b667fdfcf31a0b5d32 (diff) | |
| download | emacs-29100cfa0ea33588ee7b48d33858c97fb19c1767.tar.gz emacs-29100cfa0ea33588ee7b48d33858c97fb19c1767.zip | |
(blink-matching-open): Don't display message when no
paren is found within blink-matching-paren-distance characters.
Don't search prompt in blink-matching-paren-distance nil case.
| -rw-r--r-- | admin/FOR-RELEASE | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/simple.el | 34 |
3 files changed, 27 insertions, 17 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 51dd86929a1..58a3e63e961 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -99,10 +99,6 @@ http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00020.html | |||
| 99 | ** Bug/Patch view.el | 99 | ** Bug/Patch view.el |
| 100 | http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00073.html | 100 | http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00073.html |
| 101 | 101 | ||
| 102 | ** jbw@macs.hw.ac.uk: parentheses matching failure on valid sexp | ||
| 103 | http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01140.html | ||
| 104 | |||
| 105 | |||
| 106 | * FIXES FOR EMACS 22.3 | 102 | * FIXES FOR EMACS 22.3 |
| 107 | 103 | ||
| 108 | Here we list any small fixes that arrived too late for Emacs 22.2, but | 104 | Here we list any small fixes that arrived too late for Emacs 22.2, but |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31754a63bc5..cf557b581c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2007-09-15 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * simple.el (blink-matching-open): Don't display message when no | ||
| 4 | paren is found within blink-matching-paren-distance characters. | ||
| 5 | Don't search prompt in blink-matching-paren-distance nil case. | ||
| 6 | |||
| 1 | 2007-09-14 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2007-09-14 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 8 | ||
| 3 | * term/xterm.el (terminal-init-xterm): Add C-M- bindings. | 9 | * term/xterm.el (terminal-init-xterm): Add C-M- bindings. |
diff --git a/lisp/simple.el b/lisp/simple.el index 2aee3e43cfe..dec4111e863 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4481,15 +4481,20 @@ it skips the contents of comments that end before point." | |||
| 4481 | (point)))))) | 4481 | (point)))))) |
| 4482 | (let* ((oldpos (point)) | 4482 | (let* ((oldpos (point)) |
| 4483 | blinkpos | 4483 | blinkpos |
| 4484 | message-log-max ; Don't log messages about paren matching. | 4484 | message-log-max ; Don't log messages about paren matching. |
| 4485 | matching-paren | 4485 | matching-paren |
| 4486 | open-paren-line-string) | 4486 | open-paren-line-string |
| 4487 | old-start | ||
| 4488 | new-start) | ||
| 4487 | (save-excursion | 4489 | (save-excursion |
| 4488 | (save-restriction | 4490 | (save-restriction |
| 4489 | (if blink-matching-paren-distance | 4491 | ;; Don't search for matching paren within minibuffer prompt. |
| 4490 | (narrow-to-region (max (minibuffer-prompt-end) | 4492 | (setq old-start (minibuffer-prompt-end)) |
| 4491 | (- (point) blink-matching-paren-distance)) | 4493 | (setq new-start |
| 4492 | oldpos)) | 4494 | (if blink-matching-paren-distance |
| 4495 | (max old-start (- (point) blink-matching-paren-distance)) | ||
| 4496 | old-start)) | ||
| 4497 | (narrow-to-region new-start oldpos) | ||
| 4493 | (condition-case () | 4498 | (condition-case () |
| 4494 | (let ((parse-sexp-ignore-comments | 4499 | (let ((parse-sexp-ignore-comments |
| 4495 | (and parse-sexp-ignore-comments | 4500 | (and parse-sexp-ignore-comments |
| @@ -4505,15 +4510,18 @@ it skips the contents of comments that end before point." | |||
| 4505 | (eq (syntax-class syntax) 4) | 4510 | (eq (syntax-class syntax) 4) |
| 4506 | (cdr syntax))))) | 4511 | (cdr syntax))))) |
| 4507 | (cond | 4512 | (cond |
| 4513 | ((not blinkpos) | ||
| 4514 | (unless (and blink-matching-paren-distance (> new-start old-start)) | ||
| 4515 | ;; When `blink-matching-paren-distance' is non-nil and we | ||
| 4516 | ;; didn't find a matching paren within that many characters | ||
| 4517 | ;; don't display a message. | ||
| 4518 | (message "Unmatched parenthesis"))) | ||
| 4508 | ((not (or (eq matching-paren (char-before oldpos)) | 4519 | ((not (or (eq matching-paren (char-before oldpos)) |
| 4509 | ;; The cdr might hold a new paren-class info rather than | 4520 | ;; The cdr might hold a new paren-class info rather than |
| 4510 | ;; a matching-char info, in which case the two CDRs | 4521 | ;; a matching-char info, in which case the two CDRs |
| 4511 | ;; should match. | 4522 | ;; should match. |
| 4512 | (eq matching-paren (cdr (syntax-after (1- oldpos)))))) | 4523 | (eq matching-paren (cdr (syntax-after (1- oldpos)))))) |
| 4513 | (message "Mismatched parentheses")) | 4524 | (message "Mismatched parentheses")) |
| 4514 | ((not blinkpos) | ||
| 4515 | (if (not blink-matching-paren-distance) | ||
| 4516 | (message "Unmatched parenthesis"))) | ||
| 4517 | ((pos-visible-in-window-p blinkpos) | 4525 | ((pos-visible-in-window-p blinkpos) |
| 4518 | ;; Matching open within window, temporarily move to blinkpos but only | 4526 | ;; Matching open within window, temporarily move to blinkpos but only |
| 4519 | ;; if `blink-matching-paren-on-screen' is non-nil. | 4527 | ;; if `blink-matching-paren-on-screen' is non-nil. |