summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-10-01 18:13:11 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-10-01 18:13:11 -0400
commita8b36b953e3dc4d50dbfe430d5c579f7b1fd71e7 (patch)
treecfbea5b3f0c9514911375ef68a290c193730bf22 /lisp/simple.el
parentc59ef5ef53f8e33a693f1107c1d61535bbd3a187 (diff)
downloademacs-a8b36b953e3dc4d50dbfe430d5c579f7b1fd71e7.tar.gz
emacs-a8b36b953e3dc4d50dbfe430d5c579f7b1fd71e7.tar.bz2
emacs-a8b36b953e3dc4d50dbfe430d5c579f7b1fd71e7.zip
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.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 8469ff0d892..8504cf4be19 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3629,7 +3629,7 @@ No filtering is done unless a hook says to."
;;;; Window system cut and paste hooks.
-(defvar interprogram-cut-function nil
+(defvar interprogram-cut-function #'x-select-text
"Function to call to make a killed region available to other programs.
Most window systems provide a facility for cutting and pasting
text between different programs, such as the clipboard on X and
@@ -3640,7 +3640,7 @@ put in the kill ring, to make the new kill available to other
programs. The function takes one argument, TEXT, which is a
string containing the text which should be made available.")
-(defvar interprogram-paste-function nil
+(defvar interprogram-paste-function #'ignore
"Function to call to get text cut from other programs.
Most window systems provide a facility for cutting and pasting
text between different programs, such as the clipboard on X and