emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/simple.el,v [EMACS_22_BASE]


From: Martin Rudalics
Subject: [Emacs-diffs] Changes to emacs/lisp/simple.el,v [EMACS_22_BASE]
Date: Sat, 15 Sep 2007 09:33:38 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Martin Rudalics <m061211>       07/09/15 09:33:38

Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.859.2.8
retrieving revision 1.859.2.9
diff -u -b -r1.859.2.8 -r1.859.2.9
--- simple.el   25 Aug 2007 20:20:23 -0000      1.859.2.8
+++ simple.el   15 Sep 2007 09:33:37 -0000      1.859.2.9
@@ -4483,13 +4483,18 @@
           blinkpos
           message-log-max  ; Don't log messages about paren matching.
           matching-paren
-          open-paren-line-string)
+          open-paren-line-string
+          old-start
+          new-start)
       (save-excursion
        (save-restriction
+         ;; Don't search for matching paren within minibuffer prompt.
+         (setq old-start (minibuffer-prompt-end))
+         (setq new-start
          (if blink-matching-paren-distance
-             (narrow-to-region (max (minibuffer-prompt-end)
-                                    (- (point) blink-matching-paren-distance))
-                               oldpos))
+                   (max old-start (- (point) blink-matching-paren-distance))
+                 old-start))
+         (narrow-to-region new-start oldpos)
          (condition-case ()
              (let ((parse-sexp-ignore-comments
                     (and parse-sexp-ignore-comments
@@ -4505,15 +4510,18 @@
                          (eq (syntax-class syntax) 4)
                          (cdr syntax)))))
        (cond
+        ((not blinkpos)
+         (unless (and blink-matching-paren-distance (> new-start old-start))
+           ;; When `blink-matching-paren-distance' is non-nil and we
+           ;; didn't find a matching paren within that many characters
+           ;; don't display a message.
+           (message "Unmatched parenthesis")))
         ((not (or (eq matching-paren (char-before oldpos))
                    ;; The cdr might hold a new paren-class info rather than
                    ;; a matching-char info, in which case the two CDRs
                    ;; should match.
                    (eq matching-paren (cdr (syntax-after (1- oldpos))))))
          (message "Mismatched parentheses"))
-        ((not blinkpos)
-         (if (not blink-matching-paren-distance)
-             (message "Unmatched parenthesis")))
         ((pos-visible-in-window-p blinkpos)
          ;; Matching open within window, temporarily move to blinkpos but only
          ;; if `blink-matching-paren-on-screen' is non-nil.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]