diff options
| author | Paul Eggert | 2012-02-24 22:41:40 -0800 |
|---|---|---|
| committer | Paul Eggert | 2012-02-24 22:41:40 -0800 |
| commit | a89654f8f34114db543cb91363e8fded6d73e986 (patch) | |
| tree | 5ac508597ef2aa460308b4b26c244779e48cdb40 /src/xselect.c | |
| parent | 6e6c82a4e687708d5a7a3887f92db45bd74da276 (diff) | |
| parent | 67b0de11479247cb8bd8491e10e0b464046f18be (diff) | |
| download | emacs-a89654f8f34114db543cb91363e8fded6d73e986.tar.gz emacs-a89654f8f34114db543cb91363e8fded6d73e986.zip | |
Merge from trunk.
Diffstat (limited to 'src/xselect.c')
| -rw-r--r-- | src/xselect.c | 47 |
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 | |||
| 1981 | anything that the functions on `selection-converter-alist' know about. | 1981 | anything that the functions on `selection-converter-alist' know about. |
| 1982 | 1982 | ||
| 1983 | FRAME should be a frame that should own the selection. If omitted or | 1983 | FRAME should be a frame that should own the selection. If omitted or |
| 1984 | nil, it defaults to the selected frame. */) | 1984 | nil, it defaults to the selected frame. |
| 1985 | |||
| 1986 | On 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. */) | |||
| 2002 | DEFUN ("x-get-selection-internal", Fx_get_selection_internal, | 2004 | DEFUN ("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. |
| 2005 | SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. | 2007 | SELECTION-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.) |
| 2007 | TYPE is the type of data desired, typically `STRING'. | 2009 | TARGET-TYPE is the type of data desired, typically `STRING'. |
| 2008 | TIME_STAMP is the time to use in the XConvertSelection call for foreign | 2010 | |
| 2011 | TIME-STAMP is the time to use in the XConvertSelection call for foreign | ||
| 2009 | selections. If omitted, defaults to the time for the last event. | 2012 | selections. If omitted, defaults to the time for the last event. |
| 2010 | 2013 | ||
| 2011 | TERMINAL should be a terminal object or a frame specifying the X | 2014 | TERMINAL should be a terminal object or a frame specifying the X |
| 2012 | server to query. If omitted or nil, that stands for the selected | 2015 | server to query. If omitted or nil, that stands for the selected |
| 2013 | frame's display, or the first available X display. */) | 2016 | frame's display, or the first available X display. |
| 2017 | |||
| 2018 | On 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. |
| 2052 | Disowning it means there is no such selection. | 2057 | Disowning it means there is no such selection. |
| 2053 | 2058 | ||
| 2059 | Sets the last-change time for the selection to TIME-OBJECT (by default | ||
| 2060 | the time of the last event). | ||
| 2061 | |||
| 2054 | TERMINAL should be a terminal object or a frame specifying the X | 2062 | TERMINAL should be a terminal object or a frame specifying the X |
| 2055 | server to query. If omitted or nil, that stands for the selected | 2063 | server to query. If omitted or nil, that stands for the selected |
| 2056 | frame's display, or the first available X display. */) | 2064 | frame's display, or the first available X display. |
| 2065 | |||
| 2066 | On Nextstep, the TIME-OBJECT and TERMINAL arguments are unused. | ||
| 2067 | On 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 | ||
| 2110 | TERMINAL should be a terminal object or a frame specifying the X | 2121 | TERMINAL should be a terminal object or a frame specifying the X |
| 2111 | server to query. If omitted or nil, that stands for the selected | 2122 | server to query. If omitted or nil, that stands for the selected |
| 2112 | frame's display, or the first available X display. */) | 2123 | frame's display, or the first available X display. |
| 2124 | |||
| 2125 | On 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. |
| 2130 | SELECTION should be the name of the selection in question, typically | 2143 | SELECTION should be the name of the selection in question, typically |
| 2131 | one of the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. (X expects | 2144 | one of the symbols `PRIMARY', `SECONDARY', `CLIPBOARD', or |
| 2132 | these 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'. | 2146 | symbol nil is the same as `PRIMARY', and t is the same as `SECONDARY'. |
| 2134 | 2147 | ||
| 2135 | TERMINAL should be a terminal object or a frame specifying the X | 2148 | TERMINAL should be a terminal object or a frame specifying the X |
| 2136 | server to query. If omitted or nil, that stands for the selected | 2149 | server to query. If omitted or nil, that stands for the selected |
| 2137 | frame's display, or the first available X display. */) | 2150 | frame's display, or the first available X display. |
| 2151 | |||
| 2152 | On 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 | ||