From: Glenn Morris Date: Sun, 11 Dec 2016 02:11:56 +0000 (-0800) Subject: Fixes related to select-enable-clipboard X-Git-Tag: emacs-25.1.91~29 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=442e2f6;p=emacs.git 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) --- 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." 'eshell-kill-append) t) ("/dev/clip" (lambda (mode) (if (eq mode 'overwrite) - (let ((gui-select-enable-clipboard t)) + (let ((select-enable-clipboard t)) (kill-new ""))) 'eshell-clipboard-append) t)) "Map virtual devices name to Emacs Lisp functions. @@ -325,7 +325,7 @@ last execution result should not be changed." (defun eshell-clipboard-append (string) "Call `kill-append' with STRING, if it is indeed a string." (if (stringp string) - (let ((gui-select-enable-clipboard t)) + (let ((select-enable-clipboard t)) (kill-append string nil)))) (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 @@ (gui-backend-selection-exists-p 'CLIPBOARD)) (not buffer-read-only))))) -(defvar gui-select-enable-clipboard) - (defun clipboard-yank () "Insert the clipboard contents, or the last stretch of killed text." (interactive "*") - (let ((gui-select-enable-clipboard t)) + (let ((select-enable-clipboard t)) (yank))) (defun clipboard-kill-ring-save (beg end &optional region) @@ -543,7 +541,7 @@ If the optional argument REGION is non-nil, the function ignores BEG and END, and saves the current region instead." (interactive "r\np") - (let ((gui-select-enable-clipboard t)) + (let ((select-enable-clipboard t)) (kill-ring-save beg end region))) (defun clipboard-kill-region (beg end &optional region) @@ -551,7 +549,7 @@ BEG and END, and saves the current region instead." If the optional argument REGION is non-nil, the function ignores BEG and END, and kills the current region instead." (interactive "r\np") - (let ((gui-select-enable-clipboard t)) + (let ((select-enable-clipboard t)) (kill-region beg end region))) (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." (if (w16-selection-owner-p selection) t) ;; FIXME: Other systems don't obey - ;; gui-select-enable-clipboard here. + ;; select-enable-clipboard here. (with-demoted-errors "w16-set-clipboard-data: %S" (w16-set-clipboard-data value)) value))