changeset 64894:aee8ba4e5b1a

Add handler to desktop-buffer-mode-handlers. (dired-restore-desktop-buffer): Remove autoload cookie. (dired-mode): Add autoload cookie.
author Lars Hansen <larsh@soem.dk>
date Wed, 10 Aug 2005 19:39:16 +0000
parents 2c0fe8b09aaa
children bde8cc177550
files lisp/dired.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired.el	Wed Aug 10 19:38:52 2005 +0000
+++ b/lisp/dired.el	Wed Aug 10 19:39:16 2005 +0000
@@ -1469,6 +1469,8 @@
 ;; Dired mode is suitable only for specially formatted data.
 (put 'dired-mode 'mode-class 'special)
 
+;; Autoload cookie needed by desktop.el
+;;;###autoload
 (defun dired-mode (&optional dirname switches)
   "\
 Mode for \"editing\" directory listings.
@@ -3270,7 +3272,6 @@
          (function (lambda (f) (desktop-file-name (car f) desktop-dirname)))
          dired-subdir-alist)))))
 
-;;;###autoload
 (defun dired-restore-desktop-buffer (desktop-buffer-file-name
                                      desktop-buffer-name
                                      desktop-buffer-misc)
@@ -3291,6 +3292,9 @@
       (when desktop-missing-file-warning (sit-for 1))
       nil)))
 
+(add-to-list 'desktop-buffer-mode-handlers
+             '(dired-mode . dired-restore-desktop-buffer))
+
 
 (if (eq system-type 'vax-vms)
     (load "dired-vms"))