comparison lisp/dragdrop.el @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents c9fe270a4101
children
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
49 :type 'boolean 49 :type 'boolean
50 :group 'drag-n-drop) 50 :group 'drag-n-drop)
51 51
52 (defcustom dragdrop-autoload-tm-view nil 52 (defcustom dragdrop-autoload-tm-view nil
53 "*{EXPERIMENTAL} If non-nil, autoload tm-view to decode MIME data. 53 "*{EXPERIMENTAL} If non-nil, autoload tm-view to decode MIME data.
54 Otherwise, the buffer is only decoded if tm-view is already avaiable." 54 Otherwise, the buffer is only decoded if tm-view is already available."
55 :type 'boolean 55 :type 'boolean
56 :group 'drag-n-drop) 56 :group 'drag-n-drop)
57 57
58 ;; the widget for editing the drop-functions 58 ;; the widget for editing the drop-functions
59 (define-widget 'dragdrop-function-widget 'list 59 (define-widget 'dragdrop-function-widget 'list
174 (while (not (eq drop-funs ())) 174 (while (not (eq drop-funs ()))
175 (setq flist (car drop-funs)) 175 (setq flist (car drop-funs))
176 (and (or (eq (cadr flist) t) 176 (and (or (eq (cadr flist) t)
177 (= (cadr flist) button)) 177 (= (cadr flist) button))
178 (or (eq (caddr flist) t) 178 (or (eq (caddr flist) t)
179 (dragdrop-compare-mods (caddr flist) modifiers)) 179 (dragdrop-compare-mods (caddr flist) mods))
180 (apply (car flist) `(,event ,object ,@(cdddr flist))) 180 (apply (car flist) `(,event ,object ,@(cdddr flist)))
181 ;; (funcall (car flist) event object) 181 ;; (funcall (car flist) event object)
182 (throw 'dragdrop-drop-is-done t)) 182 (throw 'dragdrop-drop-is-done t))
183 (setq drop-funs (cdr drop-funs)))) 183 (setq drop-funs (cdr drop-funs))))
184 nil) 184 nil)
354 (defun experimental-dragdrop-drag-region (event begin end) 354 (defun experimental-dragdrop-drag-region (event begin end)
355 "*{EXPERIMENTAL} Drag a region. 355 "*{EXPERIMENTAL} Drag a region.
356 This function uses special data types if the low-level 356 This function uses special data types if the low-level
357 protocol requires it. It does so by calling 357 protocol requires it. It does so by calling
358 dragdrop-drag-pure-text." 358 dragdrop-drag-pure-text."
359 (dragdrop-drag-pure-text event 359 (experimental-dragdrop-drag-pure-text event
360 (buffer-substring-no-properties begin end))) 360 (buffer-substring-no-properties begin end)))
361 361
362 (defun experimental-dragdrop-drag-pure-text (event text) 362 (defun experimental-dragdrop-drag-pure-text (event text)
363 "*{EXPERIMENTAL} Drag text-only data. 363 "*{EXPERIMENTAL} Drag text-only data.
364 Takes care of special low-level protocol data types. 364 Takes care of special low-level protocol data types.