[Top][All Lists]

[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

From: Drew Adams
Subject: bug#18090: 24.4.50; `delete-selection-helper' logic changed for non-mouse region?
Date: Sun, 23 Sep 2018 18:35:03 -0700 (PDT)

> You are missing the <mouse-2> part above.

I wasn't missing it. I was trying to point out that that code has nothing
to do with mouse yanking. As you say, mouse-yank commands are not
supported by `delete-selection-mode' - they do not have a `yank'
`delete-selection-mode' property value.

That code, which you say could be deleted altogether, is essential for
`delete-selection-mode' to handle `yank'. Don't you agree? That was
my point. The code in question is about commands whose property
value is `yank'.

Do you agree? If not, why do you think all of that code could be deleted?


Anyway, I think I understand why you added the `mouse-region-match'
condition now. But it seems to me that that condition should be used,
as Eli hinted, only when `mouse-drag-copy-region' is non-nil. (It is nil
by default now.)

Do you agree? Isn't that the (only) case where you are bothered by
the mouse selection being replaced by the previous kill-ring entry
(instead of the implicit one from the mouse selection)?

IOW, do you think this addition makes sense?

(when (and (string= (buffer-substring-no-properties
                     (point) (mark))
                    (car kill-ring))
           mouse-drag-copy-region ; <======
           (fboundp 'mouse-region-match)
  (current-kill 1))

reply via email to

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