1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Consolidate x-select-text.

* lisp/frame.el (gui-method, gui-method-define, gui-method-declare)
(gui-call): New macros.
(gui-method--name): New function.
(frame-creation-function-alist): Use gui-method-declare.
(make-frame): Use gui-method.
* lisp/select.el (gui-select-enable-clipboard): Rename from
x-select-enable-clipboard and move here.
(x-select-enable-clipboard): Define as obsolete alias.
(gui-last-selected-text): New var, to replace x-last-selected-text.
(gui-select-text): New GUI method.
(gui-select-text): New function.
(x-select-text): Define as obsolete alias.
* lisp/term/common-win.el (x-select-enable-clipboard, x-select-text):
Move to select.el.
* lisp/simple.el (interprogram-cut-function): Change default to
x-select-text.
(interprogram-paste-function): Change default to `ignore'.
* lisp/w32-common-fns.el (interprogram-cut-function): Don't modify.
* lisp/term/x-win.el (interprogram-cut-function): Don't modify.
(gui-select-text): Add method for x.
* lisp/term/w32-win.el (gui-select-text): Add method for w32.
* lisp/term/pc-win.el (x-last-selected-text): Remove, use
gui-last-selected-text instead.
(msdos-initialize-window-system): Don't set interprogram-cut-function.
(gui-select-text): Add method for pc.
* lisp/term/ns-win.el (ns-last-selected-text): Remove, use
gui-last-selected-text instead.
(gui-select-text): Add method for ns.
(x-setup-function-keys): Don't change interprogram-cut-function.
* lisp/loadup.el ("startup"): Load after "frame".
* lisp/subr.el (package--builtin-versions, package--description-file):
Move from startup.el.
* lisp/startup.el (package--builtin-versions, package--description-file):
Move to subr.el.
(handle-args-function-alist, window-system-initialization-alist):
Use gui-method-declare.
(command-line): Use gui-method.
* src/xselect.c (selection-converter-alist): Fix docstring.
This commit is contained in:
Stefan Monnier 2014-10-01 18:13:11 -04:00
parent c59ef5ef53
commit a8b36b953e
17 changed files with 181 additions and 190 deletions

View file

@ -118,8 +118,6 @@ from executing while Emacs is redisplaying."
:type 'integer
:group 'eshell-io)
(defvar x-select-enable-clipboard) ; term/common-win
(defcustom eshell-virtual-targets
'(("/dev/eshell" eshell-interactive-print nil)
("/dev/kill" (lambda (mode)
@ -128,7 +126,7 @@ from executing while Emacs is redisplaying."
'eshell-kill-append) t)
("/dev/clip" (lambda (mode)
(if (eq mode 'overwrite)
(let ((x-select-enable-clipboard t))
(let ((gui-select-enable-clipboard t))
(kill-new "")))
'eshell-clipboard-append) t))
"Map virtual devices name to Emacs Lisp functions.
@ -328,7 +326,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 ((x-select-enable-clipboard t))
(let ((gui-select-enable-clipboard t))
(kill-append string nil))))
(defun eshell-get-target (target &optional mode)