GNU bug report logs - #53894
27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring

Previous Next

Package: emacs;

Reported by: Ignacio Casso <ignaciocasso <at> hotmail.com>

Date: Wed, 9 Feb 2022 09:35:01 UTC

Severity: normal

Tags: patch

Found in version 27.2

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ignacio Casso <ignaciocasso <at> hotmail.com>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 53894 <at> debbugs.gnu.org
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 <at> hotmail.com>
> Cc: luangruo <at> yahoo.com, 53894 <at> debbugs.gnu.org, larsi <at> 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.




This bug report was last modified 3 years and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.