:group 'desktop
:version "22.2")
-(defcustom desktop-path '("." "~")
+(defcustom desktop-path (list "." user-emacs-directory "~")
"List of directories to search for the desktop file.
The base name of the file is specified in `desktop-base-file-name'."
:type '(repeat directory)
:type '(repeat symbol)
:group 'desktop)
-;; We skip .log files because they are normally temporary.
-;; (ftp) files because they require passwords and whatnot.
-(defcustom desktop-buffers-not-to-save
- "\\(^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\)$"
+(defcustom desktop-buffers-not-to-save nil
"Regexp identifying buffers that are to be excluded from saving."
- :type 'regexp
+ :type '(choice (const :tag "None" nil)
+ regexp)
+ :version "23.2" ; set to nil
:group 'desktop)
;; Skip tramp and ange-ftp files
(defcustom desktop-files-not-to-save
- "^/[^/:]*:"
+ "\\(^/[^/:]*:\\|(ftp)$\\)"
"Regexp identifying files whose buffers are to be excluded from saving."
- :type 'regexp
+ :type '(choice (const :tag "None" nil)
+ regexp)
:group 'desktop)
;; We skip TAGS files to save time (tags-file-name is saved instead).
MODE is the major mode.
\n\(fn FILENAME BUFNAME MODE)"
(let ((case-fold-search nil))
- (and (not (string-match desktop-buffers-not-to-save bufname))
+ (and (not (and (stringp desktop-buffers-not-to-save)
+ (not filename)
+ (string-match desktop-buffers-not-to-save bufname)))
(not (memq mode desktop-modes-not-to-save))
(or (and filename
+ (stringp desktop-files-not-to-save)
(not (string-match desktop-files-not-to-save filename)))
(and (eq mode 'dired-mode)
(with-current-buffer bufname
(setq desktop-lazy-timer nil))
(when desktop-buffer-args-list
(setq desktop-buffer-args-list nil)
- (when (interactive-p)
+ (when (called-interactively-p 'interactive)
(message "Lazy desktop load aborted"))))
;; ----------------------------------------------------------------------------