Mercurial > emacs
comparison lisp/x-dnd.el @ 56852:4504840779eb
* x-dnd.el (x-dnd-protocol-alist): Document update.
(x-dnd-known-types): Defcustom it.
(x-dnd-handle-motif): Print message-atom in error message.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Tue, 31 Aug 2004 11:24:10 +0000 |
parents | 82f3f56ffbf1 |
children | 61662d4f85c7 cc29203a9a04 3219f94257bc |
comparison
equal
deleted
inserted
replaced
56851:f3a8f3204f86 | 56852:4504840779eb |
---|---|
56 ("^file://" . x-dnd-open-file) ; URL with host | 56 ("^file://" . x-dnd-open-file) ; URL with host |
57 ("^file:" . x-dnd-open-local-file) ; Old KDE, Motif, Sun | 57 ("^file:" . x-dnd-open-local-file) ; Old KDE, Motif, Sun |
58 ) | 58 ) |
59 | 59 |
60 "The functions to call for different protocols when a drop is made. | 60 "The functions to call for different protocols when a drop is made. |
61 This variable is used by `x-dnd-handle-uri-list' and `x-dnd-handle-moz-url'. | 61 This variable is used by `x-dnd-handle-uri-list', `x-dnd-handle-file-name' |
62 The list contains of (REGEXP . FUNCTION) pairs. | 62 and `x-dnd-handle-moz-url'. The list contains of (REGEXP . FUNCTION) pairs. |
63 The functions shall take two arguments, URL, which is the URL dropped and | 63 The functions shall take two arguments, URL, which is the URL dropped and |
64 ACTION which is the action to be performed for the drop (move, copy, link, | 64 ACTION which is the action to be performed for the drop (move, copy, link, |
65 private or ask). | 65 private or ask). |
66 If no match is found here, and the value of `browse-url-browser-function' | 66 If no match is found here, and the value of `browse-url-browser-function' |
67 is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. | 67 is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. |
102 (defcustom x-dnd-open-file-other-window nil | 102 (defcustom x-dnd-open-file-other-window nil |
103 "If non-nil, always use find-file-other-window to open dropped files." | 103 "If non-nil, always use find-file-other-window to open dropped files." |
104 :type 'boolean | 104 :type 'boolean |
105 :group 'x) | 105 :group 'x) |
106 | 106 |
107 ;; Internal variables | 107 (defcustom x-dnd-known-types |
108 | |
109 (defvar x-dnd-known-types | |
110 '("text/uri-list" | 108 '("text/uri-list" |
111 "text/x-moz-url" | 109 "text/x-moz-url" |
112 "_NETSCAPE_URL" | 110 "_NETSCAPE_URL" |
113 "FILE_NAME" | 111 "FILE_NAME" |
114 "UTF8_STRING" | 112 "UTF8_STRING" |
119 "COMPOUND_TEXT" | 117 "COMPOUND_TEXT" |
120 "STRING" | 118 "STRING" |
121 "TEXT" | 119 "TEXT" |
122 ) | 120 ) |
123 "The types accepted by default for dropped data. | 121 "The types accepted by default for dropped data. |
124 The types are chosen in the order they appear in the list.") | 122 The types are chosen in the order they appear in the list." |
123 :type '(repeat string) | |
124 :group 'x | |
125 ) | |
126 | |
127 ;; Internal variables | |
125 | 128 |
126 (defvar x-dnd-current-state nil | 129 (defvar x-dnd-current-state nil |
127 "The current state for a drop. | 130 "The current state for a drop. |
128 This is an alist with one entry for each display. The value for each display | 131 This is an alist with one entry for each display. The value for each display |
129 is a vector that contains the state for drag and drop for that display. | 132 is a vector that contains the state for drag and drop for that display. |
863 (intern atom-name) | 866 (intern atom-name) |
864 (if action 'XmTRANSFER_SUCCESS 'XmTRANSFER_FAILURE) | 867 (if action 'XmTRANSFER_SUCCESS 'XmTRANSFER_FAILURE) |
865 timestamp) | 868 timestamp) |
866 (x-dnd-forget-drop frame))) | 869 (x-dnd-forget-drop frame))) |
867 | 870 |
868 (t (error "Unknown Motif DND message %s %s" message data))))) | 871 (t (error "Unknown Motif DND message %s %s" message-atom data))))) |
869 | 872 |
870 | 873 |
871 ;;; | 874 ;;; |
872 | 875 |
873 | 876 |