aboutsummaryrefslogtreecommitdiffstats
path: root/src/xselect.c
diff options
context:
space:
mode:
authorStefan Monnier2014-10-01 18:13:11 -0400
committerStefan Monnier2014-10-01 18:13:11 -0400
commita8b36b953e3dc4d50dbfe430d5c579f7b1fd71e7 (patch)
treecfbea5b3f0c9514911375ef68a290c193730bf22 /src/xselect.c
parentc59ef5ef53f8e33a693f1107c1d61535bbd3a187 (diff)
downloademacs-a8b36b953e3dc4d50dbfe430d5c579f7b1fd71e7.tar.gz
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 'src/xselect.c')
-rw-r--r--src/xselect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xselect.c b/src/xselect.c
index 0e8a43717e0..a06243f5924 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -2638,12 +2638,14 @@ syms_of_xselect (void)
2638 converted_selections = NULL; 2638 converted_selections = NULL;
2639 conversion_fail_tag = None; 2639 conversion_fail_tag = None;
2640 2640
2641 /* FIXME: Duplicate definition in nsselect.c. */
2641 DEFVAR_LISP ("selection-converter-alist", Vselection_converter_alist, 2642 DEFVAR_LISP ("selection-converter-alist", Vselection_converter_alist,
2642 doc: /* An alist associating X Windows selection-types with functions. 2643 doc: /* An alist associating X Windows selection-types with functions.
2643These functions are called to convert the selection, with three args: 2644These functions are called to convert the selection, with three args:
2644the name of the selection (typically `PRIMARY', `SECONDARY', or `CLIPBOARD'); 2645the name of the selection (typically `PRIMARY', `SECONDARY', or `CLIPBOARD');
2645a desired type to which the selection should be converted; 2646a desired type to which the selection should be converted;
2646and the local selection value (whatever was given to `x-own-selection'). 2647and the local selection value (whatever was given to
2648`x-own-selection-internal').
2647 2649
2648The function should return the value to send to the X server 2650The function should return the value to send to the X server
2649\(typically a string). A return value of nil 2651\(typically a string). A return value of nil