From: Glenn Morris Date: Thu, 10 Oct 2013 01:03:11 +0000 (-0400) Subject: * lisp/desktop.el (desktop-save): Default to saving in .emacs.d, X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1307 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9271e90e7349a9fa03edebe72e6baa5fd5a0e624;p=emacs.git * lisp/desktop.el (desktop-save): Default to saving in .emacs.d, since PWD is no longer in desktop-path by default. Fixes: debbugs:15319 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fa3319c7a67..c939b9f6f89 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-10-10 Glenn Morris + * 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. diff --git a/lisp/desktop.el b/lisp/desktop.el index 1bbc33cb244..79c06f15fb6 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -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 ;; Keywords: convenience @@ -922,7 +921,13 @@ Parameter DIRNAME specifies where to save the desktop file. 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)