summaryrefslogtreecommitdiff
path: root/lisp/menu-bar.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/menu-bar.el')
-rw-r--r--lisp/menu-bar.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index f9dde5748c2..512d65fa580 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -535,19 +535,25 @@
(defun clipboard-yank ()
"Insert the clipboard contents, or the last stretch of killed text."
(interactive "*")
- (let ((gui-select-enable-clipboard t))
+ (let ((gui-select-enable-clipboard t)
+ (interprogram-paste-function (or interprogram-paste-function
+ #'gui-selection-value)))
(yank)))
(defun clipboard-kill-ring-save (beg end &optional region)
"Copy region to kill ring, and save in the GUI's clipboard."
(interactive "r\np")
- (let ((gui-select-enable-clipboard t))
+ (let ((gui-select-enable-clipboard t)
+ (interprogram-cut-function (or interprogram-cut-function
+ #'gui-select-text)))
(kill-ring-save beg end region)))
(defun clipboard-kill-region (beg end &optional region)
"Kill the region, and save it in the GUI's clipboard."
(interactive "r\np")
- (let ((gui-select-enable-clipboard t))
+ (let ((gui-select-enable-clipboard t)
+ (interprogram-cut-function (or interprogram-cut-function
+ #'gui-select-text)))
(kill-region beg end region)))
(defun menu-bar-enable-clipboard ()