aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-05-09 17:30:08 -0700
committerGlenn Morris2010-05-09 17:30:08 -0700
commite1cb2c1314c1a58d9d83293019b5d563a3edb072 (patch)
treee2b3123e2003d79479716fd6921956d94cb10963
parent19ae0deb1c8c9475eb81daf7876cec5a44b5d5e0 (diff)
downloademacs-e1cb2c1314c1a58d9d83293019b5d563a3edb072.tar.gz
emacs-e1cb2c1314c1a58d9d83293019b5d563a3edb072.zip
Backport from trunk: Fix bug#5755.
* desktop.el (desktop-save-buffer-p): Don't mistakenly include all dired buffers, even tramp ones. (Bug#5755) [Backport from trunk]
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/desktop.el13
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 99bbf884752..90c3d0de1a0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-05-10 Glenn Morris <rgm@gnu.org>
2
3 * desktop.el (desktop-save-buffer-p): Don't mistakenly include
4 all dired buffers, even tramp ones. (Bug#5755) [Backport from trunk]
5
12010-05-07 Chong Yidong <cyd@stupidchicken.com> 62010-05-07 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * Version 23.2 released. 8 * Version 23.2 released.
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 33e8cb1745f..0e6153cfe47 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1,7 +1,8 @@
1;;; desktop.el --- save partial status of Emacs when killed 1;;; desktop.el --- save partial status of Emacs when killed
2 2
3;; Copyright (C) 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2003, 3;; Copyright (C) 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2003,
4;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 4;; 2004, 2005, 2006, 2007, 2008, 2009, 2010
5;; Free Software Foundation, Inc.
5 6
6;; Author: Morten Welinder <terra@diku.dk> 7;; Author: Morten Welinder <terra@diku.dk>
7;; Keywords: convenience 8;; Keywords: convenience
@@ -811,19 +812,23 @@ which means to truncate VAR's value to at most MAX-SIZE elements
811FILENAME is the visited file name, BUFNAME is the buffer name, and 812FILENAME is the visited file name, BUFNAME is the buffer name, and
812MODE is the major mode. 813MODE is the major mode.
813\n\(fn FILENAME BUFNAME MODE)" 814\n\(fn FILENAME BUFNAME MODE)"
814 (let ((case-fold-search nil)) 815 (let ((case-fold-search nil)
816 dired-skip)
815 (and (not (and (stringp desktop-buffers-not-to-save) 817 (and (not (and (stringp desktop-buffers-not-to-save)
816 (not filename) 818 (not filename)
817 (string-match desktop-buffers-not-to-save bufname))) 819 (string-match desktop-buffers-not-to-save bufname)))
818 (not (memq mode desktop-modes-not-to-save)) 820 (not (memq mode desktop-modes-not-to-save))
821 ;; FIXME this is broken if desktop-files-not-to-save is nil.
819 (or (and filename 822 (or (and filename
820 (stringp desktop-files-not-to-save) 823 (stringp desktop-files-not-to-save)
821 (not (string-match desktop-files-not-to-save filename))) 824 (not (string-match desktop-files-not-to-save filename)))
822 (and (eq mode 'dired-mode) 825 (and (eq mode 'dired-mode)
823 (with-current-buffer bufname 826 (with-current-buffer bufname
824 (not (string-match desktop-files-not-to-save 827 (not (setq dired-skip
825 default-directory)))) 828 (string-match desktop-files-not-to-save
829 default-directory)))))
826 (and (null filename) 830 (and (null filename)
831 (null dired-skip) ; bug#5755
827 (with-current-buffer bufname desktop-save-buffer)))))) 832 (with-current-buffer bufname desktop-save-buffer))))))
828 833
829;; ---------------------------------------------------------------------------- 834;; ----------------------------------------------------------------------------