]> code.delx.au - gnu-emacs/blobdiff - lisp/menu-bar.el
Merge emacs-25 into master (using imerge)
[gnu-emacs] / lisp / menu-bar.el
index fe2b6a6681bdb006ec748c5582d5a85d2eda22b3..1ca783ac43dc19cbfdcddb2e10cf2ce18983840f 100644 (file)
 (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 ()