From: Glenn Morris Date: Thu, 25 Mar 2010 06:18:17 +0000 (-0700) Subject: Close bug#5755. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~657 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b23caf7524afb6b517ec0228cf37495cb3566da1;p=emacs.git Close bug#5755. * desktop.el (desktop-save-buffer-p): Don't mistakenly include all dired buffers, even tramp ones. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 15975452117..84f038667c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-03-25 Glenn Morris + + * desktop.el (desktop-save-buffer-p): Don't mistakenly include + all dired buffers, even tramp ones. (Bug#5755) + 2010-03-25 Stefan Monnier Add "union tags" in mpc.el. 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 @@ ;;; 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 ;; Keywords: convenience @@ -811,19 +812,23 @@ which means to truncate VAR's value to at most MAX-SIZE elements 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)))))) ;; ----------------------------------------------------------------------------