;; We skip .log files because they are normally temporary.
;; (ftp) files because they require passwords and whatnot.
-;; TAGS files to save time (tags-file-name is saved instead).
(defcustom desktop-buffers-not-to-save
- "\\(^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\|^tags\\|^TAGS\\)$"
+ "\\(^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\)$"
"Regexp identifying buffers that are to be excluded from saving."
:type 'regexp
:group 'desktop)
:type 'regexp
:group 'desktop)
-(defcustom desktop-modes-not-to-save nil
+;; We skip TAGS files to save time (tags-file-name is saved instead).
+(defcustom desktop-modes-not-to-save
+ '(tags-table-mode)
"List of major modes whose buffers should not be saved."
:type '(repeat symbol)
:group 'desktop)
(defcustom desktop-minor-mode-table
'((auto-fill-function auto-fill-mode)
- (vc-mode nil))
+ (vc-mode nil)
+ (vc-dired-mode nil))
"Table mapping minor mode variables to minor mode functions.
Each entry has the form (NAME RESTORE-FUNCTION).
NAME is the name of the buffer-local variable indicating that the minor
(defun desktop-load-file (function)
"Load the file where auto loaded FUNCTION is defined."
- (let ((fcell (symbol-function function)))
- (when (and (listp fcell)
- (eq 'autoload (car fcell)))
- (load (cadr fcell)))))
+ (when function
+ (let ((fcell (symbol-function function)))
+ (when (and (listp fcell)
+ (eq 'autoload (car fcell)))
+ (load (cadr fcell))))))
;; ----------------------------------------------------------------------------
;; Create a buffer, load its file, set its mode, ...;