[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy doe
From: |
Eli Zaretskii |
Subject: |
bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring |
Date: |
Fri, 01 Apr 2022 15:10:30 +0300 |
> From: Ignacio Casso <ignaciocasso@hotmail.com>
> Cc: luangruo@yahoo.com, 53894@debbugs.gnu.org, larsi@gnus.org
> Date: Fri, 01 Apr 2022 13:23:27 +0200
>
> >> +(defun gui--set-last-clipboard-selection (text)
> >> + "Save last clipboard selection.
> >> +Save the selected text, passed as argument, and for window
> >> +systems that support it, save the selection timestamp too."
> >> + (setq gui--last-selected-text-clipboard text)
> >> + (when (memq window-system '(x))
> >
> > This should use 'eq', nor 'memq', since you are testing against a
> > single value. (There are more of such code elsewhere in the patch.)
>
> Well the idea is that in the future there could be more window systems
> in that list, that's why I used `memq'.
Sure, but converting 'eq' comparing to a single value to 'memq'
comparing to a list of values is trivial, and thus doesn't need any
"provisions for".
> I attach the patch using `eq' instead.
Thanks.