From: Stephen Berman <stephen.berman@gmx.net>
To: emacs-pretest-bug@gnu.org
Subject: bug#4854: 23.1.50; before-string overlay and show-paren-mode
Date: Mon, 02 Nov 2009 15:49:55 +0100 [thread overview]
Message-ID: <87fx8x0yng.fsf@escher.local.home> (raw)
Start Emacs with -Q, insert the following text into a buffer:
begin
(test)
end
then eval the following:
(defun my-test ()
""
(interactive)
(widen)
(goto-char (point-min))
(let ((begin (search-forward "begin")))
(search-forward "end")
(narrow-to-region (1+ begin) (line-beginning-position))
(goto-char (point-min)))
(unless (let ((ovlist (overlays-in (1- (point)) (1+ (point)))))
(when ovlist (overlay-get (car ovlist) 'before-string)))
(let ((ov (make-overlay (point) (point) nil t t)))
(overlay-put ov 'before-string "* "))))
(global-set-key "\C-cy" 'my-test)
and now type `C-c y' in the buffer with the inserted text. The buffer
nows displays this:
* (test)
As expected, now repeating `C-c y' does not alter the display, i.e. does
not add more overlays. Now enable show-paren-mode (e.g. by checking
"Paren Match Highlighting" in the Options menu). Now repeating `C-c y'
display one additional "* " for each repetition (provided point remains
on `('). Surprisingly, however, typing `M-x my-test' repeatedly does
not add any "* ". In addition, typing a self-inserting character and
then deleting it has the effect that typing `C-c y' no longer adds "* ";
except after widening and removing the overlays: then repeating `C-c y'
adds "* " once only, as when show-paren-mode is disabled.
If the described behavior after enabling show-paren-mode is not a bug,
can anyone explain it?
In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
of 2009-10-27 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=local
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
next reply other threads:[~2009-11-02 14:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-02 14:49 Stephen Berman [this message]
2009-11-04 23:08 ` bug#4854: 23.1.50; before-string overlay and show-paren-mode Stephen Berman
2016-07-01 18:42 ` npostavs
2016-07-03 14:33 ` Stephen Berman
2016-07-03 15:36 ` npostavs
2016-07-03 15:42 ` Eli Zaretskii
2016-07-03 15:58 ` npostavs
2016-07-03 22:23 ` Stephen Berman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fx8x0yng.fsf@escher.local.home \
--to=stephen.berman@gmx.net \
--cc=4854@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.