emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r114603: * lisp/desktop.el (desktop-save): Default t


From: Glenn Morris
Subject: [Emacs-diffs] trunk r114603: * lisp/desktop.el (desktop-save): Default to saving in .emacs.d,
Date: Thu, 10 Oct 2013 01:03:17 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114603
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15319
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-10-09 21:03:11 -0400
message:
  * lisp/desktop.el (desktop-save): Default to saving in .emacs.d,
  since PWD is no longer in desktop-path by default.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/desktop.el                desktop.el-20091113204419-o5vbwnq5f7feedwu-591
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-10 00:32:36 +0000
+++ b/lisp/ChangeLog    2013-10-10 01:03:11 +0000
@@ -1,5 +1,8 @@
 2013-10-10  Glenn Morris  <address@hidden>
 
+       * desktop.el (desktop-save): Default to saving in .emacs.d,
+       since PWD is no longer in desktop-path by default.  (Bug#15319)
+
        * menu-bar.el (menu-bar-options-menu): Remove text-mode auto-fill,
        now that text mode has a menu with the same entry.
        (menu-bar-text-mode-auto-fill): Remove now unused func.

=== modified file 'lisp/desktop.el'
--- a/lisp/desktop.el   2013-08-16 05:15:51 +0000
+++ b/lisp/desktop.el   2013-10-10 01:03:11 +0000
@@ -1,7 +1,6 @@
 ;;; desktop.el --- save partial status of Emacs when killed -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 1993-1995, 1997, 2000-2013 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1993-1995, 1997, 2000-2013 Free Software Foundation, Inc.
 
 ;; Author: Morten Welinder <address@hidden>
 ;; Keywords: convenience
@@ -922,7 +921,13 @@
 Optional parameter RELEASE says whether we're done with this desktop.
 If AUTO-SAVE is non-nil, compare the saved contents to the one last saved,
 and don't save the buffer if they are the same."
-  (interactive "DDirectory to save desktop file in: ")
+  (interactive (list
+                ;; Or should we just use (car desktop-path)?
+                (let ((default (if (member "." desktop-path)
+                                   default-directory
+                                 user-emacs-directory)))
+                  (read-directory-name "Directory to save desktop file in: "
+                                       default default t))))
   (setq desktop-dirname (file-name-as-directory (expand-file-name dirname)))
   (save-excursion
     (let ((eager desktop-restore-eager)


reply via email to

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