emacs-devel
[Top][All Lists]
Advanced

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

address@hidden: Patch: minor display glitch with show-paren-mode]


From: Richard Stallman
Subject: address@hidden: Patch: minor display glitch with show-paren-mode]
Date: Fri, 01 Dec 2006 08:37:16 -0500

Would someone please install this, then ack?

------- Start of forwarded message -------
Date: Tue, 28 Nov 2006 11:54:26 +0000
From: Ben North <address@hidden>
To: address@hidden
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Subject: Patch: minor display glitch with show-paren-mode
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
        version=3.0.4

When using `show-paren-mode', I've noticed a slight problem: suppose you
have show-paren-mode turned on, and point is at -!- in the following:

    (setq a -!-(car b))

Then the opening and closing parens of `(car b)' are both highlighted.
Now type a few characters quickly.  If you are quick enough, the
characters you type are also highlighted, because the overlay which
highlights the `(' has not yet had a chance to be moved.  The tiny patch
below (against CVS HEAD, rev 1.69) makes the two relevant overlays
front-advancing, which seems to fix the problem.



- --- ORIG/paren.el       2006-11-28 11:14:46.840839000 +0000
+++ NEW/paren.el        2006-11-28 11:16:16.059970000 +0000
@@ -220,7 +220,7 @@
                        (point))))
              (if show-paren-overlay-1
                  (move-overlay show-paren-overlay-1 from to (current-buffer))
- -               (setq show-paren-overlay-1 (make-overlay from to)))
+               (setq show-paren-overlay-1 (make-overlay from to nil t)))
              ;; Always set the overlay face, since it varies.
              (overlay-put show-paren-overlay-1 'priority show-paren-priority)
              (overlay-put show-paren-overlay-1 'face face)))
@@ -243,7 +243,7 @@
                          (forward-point (- dir))))))
            (if show-paren-overlay
                (move-overlay show-paren-overlay from to (current-buffer))
- -             (setq show-paren-overlay (make-overlay from to))))
+             (setq show-paren-overlay (make-overlay from to nil t))))
          ;;
          ;; Always set the overlay face, since it varies.
          (overlay-put show-paren-overlay 'priority show-paren-priority)


_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel
------- End of forwarded message -------




reply via email to

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