aboutsummaryrefslogtreecommitdiffstats
path: root/src/xselect.c
diff options
context:
space:
mode:
authorPaul Eggert2012-02-24 22:41:40 -0800
committerPaul Eggert2012-02-24 22:41:40 -0800
commita89654f8f34114db543cb91363e8fded6d73e986 (patch)
tree5ac508597ef2aa460308b4b26c244779e48cdb40 /src/xselect.c
parent6e6c82a4e687708d5a7a3887f92db45bd74da276 (diff)
parent67b0de11479247cb8bd8491e10e0b464046f18be (diff)
downloademacs-a89654f8f34114db543cb91363e8fded6d73e986.tar.gz
emacs-a89654f8f34114db543cb91363e8fded6d73e986.zip
Merge from trunk.
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c47
1 files changed, 34 insertions, 13 deletions
diff --git a/src/xselect.c b/src/xselect.c
index f7b65809443..290f4d7eb4d 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1981,7 +1981,9 @@ VALUE is typically a string, or a cons of two markers, but may be
1981anything that the functions on `selection-converter-alist' know about. 1981anything that the functions on `selection-converter-alist' know about.
1982 1982
1983FRAME should be a frame that should own the selection. If omitted or 1983FRAME should be a frame that should own the selection. If omitted or
1984nil, it defaults to the selected frame. */) 1984nil, it defaults to the selected frame.
1985
1986On Nextstep, FRAME is unused. */)
1985 (Lisp_Object selection, Lisp_Object value, Lisp_Object frame) 1987 (Lisp_Object selection, Lisp_Object value, Lisp_Object frame)
1986{ 1988{
1987 if (NILP (frame)) frame = selected_frame; 1989 if (NILP (frame)) frame = selected_frame;
@@ -2002,15 +2004,18 @@ nil, it defaults to the selected frame. */)
2002DEFUN ("x-get-selection-internal", Fx_get_selection_internal, 2004DEFUN ("x-get-selection-internal", Fx_get_selection_internal,
2003 Sx_get_selection_internal, 2, 4, 0, 2005 Sx_get_selection_internal, 2, 4, 0,
2004 doc: /* Return text selected from some X window. 2006 doc: /* Return text selected from some X window.
2005SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. 2007SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
2006\(Those are literal upper-case symbol names, since that's what X expects.) 2008\(Those are literal upper-case symbol names, since that's what X expects.)
2007TYPE is the type of data desired, typically `STRING'. 2009TARGET-TYPE is the type of data desired, typically `STRING'.
2008TIME_STAMP is the time to use in the XConvertSelection call for foreign 2010
2011TIME-STAMP is the time to use in the XConvertSelection call for foreign
2009selections. If omitted, defaults to the time for the last event. 2012selections. If omitted, defaults to the time for the last event.
2010 2013
2011TERMINAL should be a terminal object or a frame specifying the X 2014TERMINAL should be a terminal object or a frame specifying the X
2012server to query. If omitted or nil, that stands for the selected 2015server to query. If omitted or nil, that stands for the selected
2013frame's display, or the first available X display. */) 2016frame's display, or the first available X display.
2017
2018On Nextstep, TIME-STAMP and TERMINAL are unused. */)
2014 (Lisp_Object selection_symbol, Lisp_Object target_type, 2019 (Lisp_Object selection_symbol, Lisp_Object target_type,
2015 Lisp_Object time_stamp, Lisp_Object terminal) 2020 Lisp_Object time_stamp, Lisp_Object terminal)
2016{ 2021{
@@ -2051,9 +2056,15 @@ DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal,
2051 doc: /* If we own the selection SELECTION, disown it. 2056 doc: /* If we own the selection SELECTION, disown it.
2052Disowning it means there is no such selection. 2057Disowning it means there is no such selection.
2053 2058
2059Sets the last-change time for the selection to TIME-OBJECT (by default
2060the time of the last event).
2061
2054TERMINAL should be a terminal object or a frame specifying the X 2062TERMINAL should be a terminal object or a frame specifying the X
2055server to query. If omitted or nil, that stands for the selected 2063server to query. If omitted or nil, that stands for the selected
2056frame's display, or the first available X display. */) 2064frame's display, or the first available X display.
2065
2066On Nextstep, the TIME-OBJECT and TERMINAL arguments are unused.
2067On MS-DOS, all this does is return non-nil if we own the selection. */)
2057 (Lisp_Object selection, Lisp_Object time_object, Lisp_Object terminal) 2068 (Lisp_Object selection, Lisp_Object time_object, Lisp_Object terminal)
2058{ 2069{
2059 Time timestamp; 2070 Time timestamp;
@@ -2109,7 +2120,9 @@ and t is the same as `SECONDARY'.
2109 2120
2110TERMINAL should be a terminal object or a frame specifying the X 2121TERMINAL should be a terminal object or a frame specifying the X
2111server to query. If omitted or nil, that stands for the selected 2122server to query. If omitted or nil, that stands for the selected
2112frame's display, or the first available X display. */) 2123frame's display, or the first available X display.
2124
2125On Nextstep, TERMINAL is unused. */)
2113 (Lisp_Object selection, Lisp_Object terminal) 2126 (Lisp_Object selection, Lisp_Object terminal)
2114{ 2127{
2115 struct frame *f = frame_for_x_selection (terminal); 2128 struct frame *f = frame_for_x_selection (terminal);
@@ -2128,13 +2141,15 @@ DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p,
2128 0, 2, 0, 2141 0, 2, 0,
2129 doc: /* Whether there is an owner for the given X selection. 2142 doc: /* Whether there is an owner for the given X selection.
2130SELECTION should be the name of the selection in question, typically 2143SELECTION should be the name of the selection in question, typically
2131one of the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. (X expects 2144one of the symbols `PRIMARY', `SECONDARY', `CLIPBOARD', or
2132these literal upper-case names.) The symbol nil is the same as 2145`CLIPBOARD_MANAGER' (X expects these literal upper-case names.) The
2133`PRIMARY', and t is the same as `SECONDARY'. 2146symbol nil is the same as `PRIMARY', and t is the same as `SECONDARY'.
2134 2147
2135TERMINAL should be a terminal object or a frame specifying the X 2148TERMINAL should be a terminal object or a frame specifying the X
2136server to query. If omitted or nil, that stands for the selected 2149server to query. If omitted or nil, that stands for the selected
2137frame's display, or the first available X display. */) 2150frame's display, or the first available X display.
2151
2152On Nextstep, TERMINAL is unused. */)
2138 (Lisp_Object selection, Lisp_Object terminal) 2153 (Lisp_Object selection, Lisp_Object terminal)
2139{ 2154{
2140 Window owner; 2155 Window owner;
@@ -2257,8 +2272,14 @@ x_clipboard_manager_save_all (void)
2257 2272
2258 local_frame = XCAR (XCDR (XCDR (XCDR (local_selection)))); 2273 local_frame = XCAR (XCDR (XCDR (XCDR (local_selection))));
2259 if (FRAME_LIVE_P (XFRAME (local_frame))) 2274 if (FRAME_LIVE_P (XFRAME (local_frame)))
2260 internal_condition_case_1 (x_clipboard_manager_save, local_frame, 2275 {
2261 Qt, x_clipboard_manager_error_2); 2276 Lisp_Object args[1];
2277 args[0] = build_string ("Saving clipboard to X clipboard manager...");
2278 Fmessage (1, args);
2279
2280 internal_condition_case_1 (x_clipboard_manager_save, local_frame,
2281 Qt, x_clipboard_manager_error_2);
2282 }
2262 } 2283 }
2263} 2284}
2264 2285