emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/paren.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/paren.el
Date: Mon, 11 Mar 2002 04:14:30 -0500

Index: emacs/lisp/paren.el
diff -c emacs/lisp/paren.el:1.50 emacs/lisp/paren.el:1.51
*** emacs/lisp/paren.el:1.50    Wed Nov  7 00:13:09 2001
--- emacs/lisp/paren.el Mon Mar 11 04:14:28 2002
***************
*** 155,160 ****
--- 155,168 ----
              (condition-case ()
                  (setq pos (scan-sexps (point) dir))
                (error (setq pos t mismatch t)))
+             ;; Move back the other way and verify we get back to the
+             ;; starting point.  If not, these two parens don't really match.
+             ;; Maybe the one at point is escaped and doesn't really count.
+             (when (integerp pos)
+               (unless (condition-case ()
+                           (eq (point) (scan-sexps pos (- dir)))
+                         (error nil))
+                 (setq pos nil)))
              ;; If found a "matching" paren, see if it is the right
              ;; kind of paren to match the one we started at.
              (when (integerp pos)



reply via email to

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