emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99801: Backport from trunk: Fix b


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99801: Backport from trunk: Fix bug#5755.
Date: Sun, 09 May 2010 17:30:08 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99801
committer: Glenn Morris <address@hidden>
branch nick: emacs-23
timestamp: Sun 2010-05-09 17:30:08 -0700
message:
  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]
modified:
  lisp/ChangeLog
  lisp/desktop.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-05-08 03:28:26 +0000
+++ b/lisp/ChangeLog    2010-05-10 00:30:08 +0000
@@ -1,3 +1,8 @@
+2010-05-10  Glenn Morris  <address@hidden>
+
+       * desktop.el (desktop-save-buffer-p): Don't mistakenly include
+       all dired buffers, even tramp ones.  (Bug#5755)  [Backport from trunk]
+
 2010-05-07  Chong Yidong  <address@hidden>
 
        * Version 23.2 released.

=== modified file 'lisp/desktop.el'
--- a/lisp/desktop.el   2010-01-13 08:35:10 +0000
+++ b/lisp/desktop.el   2010-05-10 00:30:08 +0000
@@ -1,7 +1,8 @@
 ;;; desktop.el --- save partial status of Emacs when killed
 
 ;; Copyright (C) 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;   2004, 2005, 2006, 2007, 2008, 2009, 2010
+;;   Free Software Foundation, Inc.
 
 ;; Author: Morten Welinder <address@hidden>
 ;; Keywords: convenience
@@ -811,19 +812,23 @@
 FILENAME is the visited file name, BUFNAME is the buffer name, and
 MODE is the major mode.
 \n\(fn FILENAME BUFNAME MODE)"
-  (let ((case-fold-search nil))
+  (let ((case-fold-search nil)
+        dired-skip)
     (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))
+         ;; FIXME this is broken if desktop-files-not-to-save is nil.
          (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
-                    (not (string-match desktop-files-not-to-save
-                                       default-directory))))
+                    (not (setq dired-skip
+                               (string-match desktop-files-not-to-save
+                                             default-directory)))))
              (and (null filename)
+                  (null dired-skip)     ; bug#5755
                  (with-current-buffer bufname desktop-save-buffer))))))
 
 ;; ----------------------------------------------------------------------------


reply via email to

[Prev in Thread] Current Thread [Next in Thread]