From: Drew Adams <drew.adams@oracle.com>
To: 18090@debbugs.gnu.org
Subject: bug#18090: 24.4.50; `delete-selection-helper' logic changed for non-mouse region?
Date: Wed, 23 Jul 2014 11:02:37 -0700 (PDT) [thread overview]
Message-ID: <95e066b9-792c-4b38-8f4b-fd225578ed45@default> (raw)
Prior to Emacs 23, the delsel.el code that handles a yank had this code:
;; Before a yank command, make sure we don't yank the
;; head of the kill-ring that really comes from the
;; currently active region we are going to delete.
;; That would make yank a no-op.
(when (and (string= (buffer-substring-no-properties (point) (mark))
(car kill-ring)))
(current-kill 1))
That code dates from the creation of delsel.el. In Emacs 23, these
two sexps were appended to the `and' conditions, which completely
changes the meaning/behavior (though the comment was not modified):
(fboundp 'mouse-region-match)
(mouse-region-match)
This changed the behavior so that the yanking point is now rotated only
when the mouse was used to set the region. This makes no sense to me,
but perhaps I am missing something. Does this make sense to you?
If it does make sense, then at least the comment should be updated to
reflect the current behavior.
---
BTW, I also think it would be better to use `while' instead of `when'
in the code:
(let ((tail kill-ring))
(while (and tail (string= (buffer-substring-no-properties (point) (mark))
(car tail))
(fboundp 'mouse-region-match) ; ????
(mouse-region-match)) ; ????
(current-kill 1)
(setq tail (cdr tail))))
In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
of 2014-06-28 on ODIEONE
Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/Devel/emacs/snapshot/trunk
--enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
-Ic:/Devel/emacs/include''
next reply other threads:[~2014-07-23 18:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 18:02 Drew Adams [this message]
2018-04-03 21:06 ` bug#18090: 24.4.50; `delete-selection-helper' logic changed for non-mouse region? Drew Adams
2018-09-19 17:51 ` Drew Adams
2018-09-20 6:15 ` Eli Zaretskii
2018-09-20 15:04 ` Drew Adams
2018-09-20 20:52 ` Juri Linkov
2018-09-20 21:55 ` Drew Adams
2018-09-20 22:50 ` Juri Linkov
2018-09-24 1:35 ` Drew Adams
2018-09-24 19:08 ` Juri Linkov
2018-09-24 21:16 ` Drew Adams
2018-09-25 19:02 ` Juri Linkov
2018-09-21 6:47 ` Eli Zaretskii
2022-02-20 13:06 ` Lars Ingebrigtsen
2022-03-21 18:30 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95e066b9-792c-4b38-8f4b-fd225578ed45@default \
--to=drew.adams@oracle.com \
--cc=18090@debbugs.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 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).