]> code.delx.au - gnu-emacs/blobdiff - lisp/desktop.el
New icons for debugger.
[gnu-emacs] / lisp / desktop.el
index 197680470ee539eb75ba1d44175d259c083313b9..5213e968cf0db546f914adff85c900c5920f3660 100644 (file)
@@ -153,6 +153,7 @@ The desktop is never saved when `desktop-enable' is nil."
   "File for Emacs desktop, not including the directory name."
   :type 'file
   :group 'desktop)
+(defvaralias 'desktop-basefilename 'desktop-base-file-name)
 
 (defcustom desktop-path '("." "~")
   "List of directories to search for the desktop file.
@@ -814,7 +815,6 @@ This function always sets `desktop-enable' to t."
 (defun desktop-buffer-mh () "Load a folder in the mh system."
   (if (eq 'mh-folder-mode desktop-buffer-major-mode)
       (progn
-        (eval-and-compile (require 'mh-e))
        (mh-find-path)
         (mh-visit-folder desktop-buffer-name)
        (current-buffer))))
@@ -832,7 +832,8 @@ This function always sets `desktop-enable' to t."
        'ignored)))
 
 ;; ----------------------------------------------------------------------------
-(defun desktop-buffer-file () "Load a file."
+(defun desktop-buffer-file ()
+  "Load a file."
   (if desktop-buffer-file-name
       (if (or (file-exists-p desktop-buffer-file-name)
              (and desktop-missing-file-warning
@@ -843,6 +844,9 @@ This function always sets `desktop-enable' to t."
            (condition-case nil
                (switch-to-buffer buf)
              (error (pop-to-buffer buf)))
+           (and (not (eq major-mode desktop-buffer-major-mode))
+                (functionp desktop-buffer-major-mode)
+                (funcall desktop-buffer-major-mode))
            buf)
        'ignored)))
 
@@ -940,7 +944,7 @@ This function always sets `desktop-enable' to t."
                               (cons 'case-fold-search cfs)
                               (cons 'case-replace cr)
                               (cons 'overwrite-mode (car mim)))))
-                               
+
 ;; ----------------------------------------------------------------------------
 ;; When `desktop-enable' is non-nil and "--no-desktop" is not specified on the
 ;; command line, we do the rest of what it takes to use desktop, but do it