comparison lisp/dired.el @ 62240:19d278c4224b

* dnd.el (dnd-protocol-alist): Improve custom type. * dired.el (dired-dnd-protocol-alist): New variable. (dired-mode): Use `dired-dnd-protocol-alist'. Move call of `dired-mode-hook' to the end.
author Reiner Steib <Reiner.Steib@gmx.de>
date Wed, 11 May 2005 19:32:51 +0000
parents ca956f06ae9e
children d64b656073ca 62afea0771d8
comparison
equal deleted inserted replaced
62239:55168ce0d00d 62240:19d278c4224b
197 with the buffer narrowed to the listing." 197 with the buffer narrowed to the listing."
198 :group 'dired 198 :group 'dired
199 :type 'hook) 199 :type 'hook)
200 ;; Note this can't simply be run inside function `dired-ls' as the hook 200 ;; Note this can't simply be run inside function `dired-ls' as the hook
201 ;; functions probably depend on the dired-subdir-alist to be OK. 201 ;; functions probably depend on the dired-subdir-alist to be OK.
202
203 (defcustom dired-dnd-protocol-alist
204 '(("^file:///" . dired-dnd-handle-local-file)
205 ("^file://" . dired-dnd-handle-file)
206 ("^file:" . dired-dnd-handle-local-file))
207 "The functions to call when a drop in `dired-mode' is made.
208 See `dnd-protocol-alist' for more information. When nil, behave
209 as in other buffers."
210 :type '(choice (repeat (cons (regexp) (function)))
211 (const :tag "Behave as in other buffers" nil))
212 :version "22.1"
213 :group 'dired)
202 214
203 ;; Internal variables 215 ;; Internal variables
204 216
205 (defvar dired-marker-char ?* ; the answer is 42 217 (defvar dired-marker-char ?* ; the answer is 42
206 ;; so that you can write things like 218 ;; so that you can write things like
1520 '(dired-font-lock-keywords t nil nil beginning-of-line)) 1532 '(dired-font-lock-keywords t nil nil beginning-of-line))
1521 (set (make-local-variable 'desktop-save-buffer) 1533 (set (make-local-variable 'desktop-save-buffer)
1522 'dired-desktop-buffer-misc-data) 1534 'dired-desktop-buffer-misc-data)
1523 (setq dired-switches-alist nil) 1535 (setq dired-switches-alist nil)
1524 (dired-sort-other dired-actual-switches t) 1536 (dired-sort-other dired-actual-switches t)
1525 (run-mode-hooks 'dired-mode-hook)
1526 (when (featurep 'dnd) 1537 (when (featurep 'dnd)
1527 (make-variable-buffer-local 'dnd-protocol-alist) 1538 (make-variable-buffer-local 'dnd-protocol-alist)
1528 (setq dnd-protocol-alist 1539 (setq dnd-protocol-alist
1529 (append '(("^file:///" . dired-dnd-handle-local-file) 1540 (append dired-dnd-protocol-alist dnd-protocol-alist)))
1530 ("^file://" . dired-dnd-handle-file) 1541 (run-mode-hooks 'dired-mode-hook))
1531 ("^file:" . dired-dnd-handle-local-file))
1532 dnd-protocol-alist))))
1533 1542
1534 ;; Idiosyncratic dired commands that don't deal with marks. 1543 ;; Idiosyncratic dired commands that don't deal with marks.
1535 1544
1536 (defun dired-summary () 1545 (defun dired-summary ()
1537 "Summarize basic Dired commands and show recent Dired errors." 1546 "Summarize basic Dired commands and show recent Dired errors."