[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp desktop.el
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs/lisp desktop.el |
Date: |
Sat, 18 Jul 2009 11:58:40 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 09/07/18 11:58:40
Modified files:
lisp : desktop.el
Log message:
(desktop-buffers-not-to-save): Default value is nil. Accept nil in
addition to a regexp.
(desktop-files-not-to-save): Add "(ftp)$" to the default regexp. Accept
nil in addition to a regexp.
(desktop-save-buffer-p): Don't use desktop-buffers-not-to-save for
buffers
that have an associated file. Handle nil values of
desktop-buffers-not-to-save and desktop-files-not-to-save. (Bug#3833)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/desktop.el?cvsroot=emacs&r1=1.135&r2=1.136
Patches:
Index: desktop.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/desktop.el,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -b -r1.135 -r1.136
--- desktop.el 12 Jul 2009 19:41:26 -0000 1.135
+++ desktop.el 18 Jul 2009 11:58:39 -0000 1.136
@@ -333,19 +333,18 @@
: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]+\\|(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)
: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).
@@ -812,9 +811,12 @@
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