[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18090: 24.4.50; `delete-selection-helper' logic changed for non-mous
bug#18090: 24.4.50; `delete-selection-helper' logic changed for non-mouse region?
Tue, 3 Apr 2018 14:06:11 -0700 (PDT)
Could someone else please take a look at this?
> Sent: Wednesday, July 23, 2014 11:03 AM
> 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)
> 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)
> (car tail))
> (fboundp 'mouse-region-match) ; ????
> (mouse-region-match)) ; ????
> (current-kill 1)
> (setq tail (cdr tail))))
> In GNU Emacs 188.8.131.52 (i686-pc-mingw32)
> of 2014-06-28 on ODIEONE
> Bzr revision: 117431 address@hidden
> 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
|[Prev in Thread]
||[Next in Thread]|
- bug#18090: 24.4.50; `delete-selection-helper' logic changed for non-mouse region?,
Drew Adams <=