summaryrefslogtreecommitdiff
path: root/lisp/menu-bar.el
diff options
context:
space:
mode:
authorIgnacio <ignacio.decasso@imdea.org>2022-03-13 21:05:18 +0100
committerPo Lu <luangruo@yahoo.com>2022-04-01 20:57:54 +0800
commit2b564f504bbf7c050355840b40a9897f12ed91f9 (patch)
tree999cb1c07fc02c632d7adb8e10b7f6df18cb7757 /lisp/menu-bar.el
parentff067408e460c02e69c5b7fd06a03c9b12a5744b (diff)
downloademacs-2b564f504bbf7c050355840b40a9897f12ed91f9.tar.gz
Better check for when clipboard or primary selection have changed
Previously it was done by just comparing new and old selection text, now we use also selection timestamps for systems that support it (only enabled in X for now). (bug#53894) * lisp/select.el: (gui--last-selection-timestamp-clipboard) (gui--last-selection-timestamp-primary): New variables. (gui--set-last-clipboard-selection) (gui--set-last-primary-selection) (gui--clipboard-selection-unchanged-p) (gui--primary-selection-unchanged-p): New functions.
Diffstat (limited to 'lisp/menu-bar.el')
-rw-r--r--lisp/menu-bar.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index ab64928fe76..d8c8c760f78 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -606,7 +606,8 @@
"Insert the clipboard contents, or the last stretch of killed text."
(interactive "*")
(let ((select-enable-clipboard t)
- ;; Ensure that we defeat the DWIM login in `gui-selection-value'.
+ ;; Ensure that we defeat the DWIM logic in `gui-selection-value'
+ ;; (i.e., that gui--clipboard-selection-unchanged-p returns nil).
(gui--last-selected-text-clipboard nil))
(yank)))