unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [ben@redfrontdoor.org: Patch: minor display glitch with show-paren-mode]
@ 2006-12-01 13:37 Richard Stallman
  2006-12-01 21:04 ` Vinicius Jose Latorre
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Stallman @ 2006-12-01 13:37 UTC (permalink / raw)


Would someone please install this, then ack?

------- Start of forwarded message -------
Date: Tue, 28 Nov 2006 11:54:26 +0000
From: Ben North <ben@redfrontdoor.org>
To: emacs-devel@gnu.org
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
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-12-01 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01 13:37 [ben@redfrontdoor.org: Patch: minor display glitch with show-paren-mode] Richard Stallman
2006-12-01 21:04 ` Vinicius Jose Latorre

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).