aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2016-12-10 18:11:56 -0800
committerGlenn Morris2016-12-10 18:11:56 -0800
commit442e2f61b742b315bbaec81085df9ee4e79495b1 (patch)
treeaf474050608a52a422c8918cc7ca720e515d8415
parente4ac4507968b839569b5ce12a9c4d0374dd46768 (diff)
downloademacs-442e2f61b742b315bbaec81085df9ee4e79495b1.tar.gz
emacs-442e2f61b742b315bbaec81085df9ee4e79495b1.zip
Fixes related to select-enable-clipboard
* lisp/menu-bar.el (clipboard-yank, clipboard-kill-ring-save) (clipboard-kill-region): * lisp/eshell/esh-io.el (eshell-virtual-targets) (eshell-clipboard-append): Replace option gui-select-enable-clipboard with select-enable-clipboard; renamed October 2014. (Bug#25145)
-rw-r--r--lisp/eshell/esh-io.el4
-rw-r--r--lisp/menu-bar.el8
-rw-r--r--lisp/term/pc-win.el2
3 files changed, 6 insertions, 8 deletions
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index 1b4f4093168..e88a4e0f66d 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -125,7 +125,7 @@ from executing while Emacs is redisplaying."
125 'eshell-kill-append) t) 125 'eshell-kill-append) t)
126 ("/dev/clip" (lambda (mode) 126 ("/dev/clip" (lambda (mode)
127 (if (eq mode 'overwrite) 127 (if (eq mode 'overwrite)
128 (let ((gui-select-enable-clipboard t)) 128 (let ((select-enable-clipboard t))
129 (kill-new ""))) 129 (kill-new "")))
130 'eshell-clipboard-append) t)) 130 'eshell-clipboard-append) t))
131 "Map virtual devices name to Emacs Lisp functions. 131 "Map virtual devices name to Emacs Lisp functions.
@@ -325,7 +325,7 @@ last execution result should not be changed."
325(defun eshell-clipboard-append (string) 325(defun eshell-clipboard-append (string)
326 "Call `kill-append' with STRING, if it is indeed a string." 326 "Call `kill-append' with STRING, if it is indeed a string."
327 (if (stringp string) 327 (if (stringp string)
328 (let ((gui-select-enable-clipboard t)) 328 (let ((select-enable-clipboard t))
329 (kill-append string nil)))) 329 (kill-append string nil))))
330 330
331(defun eshell-get-target (target &optional mode) 331(defun eshell-get-target (target &optional mode)
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index ba1bf34d1a5..bc182834bdf 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -530,12 +530,10 @@
530 (gui-backend-selection-exists-p 'CLIPBOARD)) 530 (gui-backend-selection-exists-p 'CLIPBOARD))
531 (not buffer-read-only))))) 531 (not buffer-read-only)))))
532 532
533(defvar gui-select-enable-clipboard)
534
535(defun clipboard-yank () 533(defun clipboard-yank ()
536 "Insert the clipboard contents, or the last stretch of killed text." 534 "Insert the clipboard contents, or the last stretch of killed text."
537 (interactive "*") 535 (interactive "*")
538 (let ((gui-select-enable-clipboard t)) 536 (let ((select-enable-clipboard t))
539 (yank))) 537 (yank)))
540 538
541(defun clipboard-kill-ring-save (beg end &optional region) 539(defun clipboard-kill-ring-save (beg end &optional region)
@@ -543,7 +541,7 @@
543If the optional argument REGION is non-nil, the function ignores 541If the optional argument REGION is non-nil, the function ignores
544BEG and END, and saves the current region instead." 542BEG and END, and saves the current region instead."
545 (interactive "r\np") 543 (interactive "r\np")
546 (let ((gui-select-enable-clipboard t)) 544 (let ((select-enable-clipboard t))
547 (kill-ring-save beg end region))) 545 (kill-ring-save beg end region)))
548 546
549(defun clipboard-kill-region (beg end &optional region) 547(defun clipboard-kill-region (beg end &optional region)
@@ -551,7 +549,7 @@ BEG and END, and saves the current region instead."
551If the optional argument REGION is non-nil, the function ignores 549If the optional argument REGION is non-nil, the function ignores
552BEG and END, and kills the current region instead." 550BEG and END, and kills the current region instead."
553 (interactive "r\np") 551 (interactive "r\np")
554 (let ((gui-select-enable-clipboard t)) 552 (let ((select-enable-clipboard t))
555 (kill-region beg end region))) 553 (kill-region beg end region)))
556 554
557(defun menu-bar-enable-clipboard () 555(defun menu-bar-enable-clipboard ()
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index 8ca98c6ec91..85c4144ad22 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -263,7 +263,7 @@ Consult the selection. Treat empty strings as if they were unset."
263 (if (w16-selection-owner-p selection) 263 (if (w16-selection-owner-p selection)
264 t) 264 t)
265 ;; FIXME: Other systems don't obey 265 ;; FIXME: Other systems don't obey
266 ;; gui-select-enable-clipboard here. 266 ;; select-enable-clipboard here.
267 (with-demoted-errors "w16-set-clipboard-data: %S" 267 (with-demoted-errors "w16-set-clipboard-data: %S"
268 (w16-set-clipboard-data value)) 268 (w16-set-clipboard-data value))
269 value)) 269 value))