]> git.eshelyaron.com Git - emacs.git/commitdiff
Fixes to desktop reading logic.
authorChong Yidong <cyd@gnu.org>
Thu, 21 Jun 2012 07:15:42 +0000 (15:15 +0800)
committerChong Yidong <cyd@gnu.org>
Thu, 21 Jun 2012 07:15:42 +0000 (15:15 +0800)
* desktop.el (desktop-read): Don't prompt if daemon.
(desktop-path): Remove . from the default value.

etc/NEWS
lisp/ChangeLog
lisp/desktop.el

index a2f3b95fe416062874cf332fa3a69d1d3b9532ea..3cd4d217a463924c762ebd97321ae6832fe430cc 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -153,6 +153,11 @@ which have not been renamed to `cl-foo*' but just `cl-foo'.
 The old `cl' is now deprecated and is nothing more than a bunch of aliases that
 provide the old non-prefixed names.
 
+** Desktop
+
+*** `desktop-path' no longer includes the "." directory.  Desktop
+files are now located in ~/.emacs.d by default.
+
 ** A new mode for Python.
 This provides several new features, including:
 per-buffer shells, better indentation, Python 3 support, and improved
index d7716f5fa1a7910ec37dc750cee0088fda72b2b6..4d130250dcfdcef2387c9585db94144a7f3269e6 100644 (file)
@@ -1,3 +1,8 @@
+2012-06-21  Chong Yidong  <cyd@gnu.org>
+
+       * desktop.el (desktop-read): Don't prompt if daemon (Bug#11674).
+       (desktop-path): Remove . from the default value (Bug#10977).
+
 2012-06-20  Chong Yidong  <cyd@gnu.org>
 
        * term.el (term-send-raw-meta): Make C-M-<char> keys work (Bug#8172).
index 5d9982940bff8103349256cee4fbb1a63cdda514..2fd9d7f10ad5995a10ef025c29c60538e677e0b3 100644 (file)
@@ -220,7 +220,7 @@ the normal hook `desktop-not-loaded-hook' is run."
   :group 'desktop
   :version "22.2")
 
-(defcustom desktop-path (list "." user-emacs-directory "~")
+(defcustom desktop-path (list user-emacs-directory "~")
   "List of directories to search for the desktop file.
 The base name of the file is specified in `desktop-base-file-name'."
   :type '(repeat directory)
@@ -410,8 +410,7 @@ is passed as the argument DESKTOP-BUFFER-MISC to functions in
                         'desktop-save-buffer "22.1")
 
 ;;;###autoload
-(defvar desktop-buffer-mode-handlers
-  nil
+(defvar desktop-buffer-mode-handlers nil
   "Alist of major mode specific functions to restore a desktop buffer.
 Functions listed are called by `desktop-create-buffer' when `desktop-read'
 evaluates the desktop file.  List elements must have the form
@@ -471,8 +470,7 @@ this table.  See also `desktop-minor-mode-handlers'."
   :group 'desktop)
 
 ;;;###autoload
-(defvar desktop-minor-mode-handlers
-  nil
+(defvar desktop-minor-mode-handlers nil
   "Alist of functions to restore non-standard minor modes.
 Functions are called by `desktop-create-buffer' to restore minor modes.
 List elements must have the form
@@ -981,6 +979,7 @@ It returns t if a desktop file was loaded, nil otherwise."
          (if (and owner
                   (memq desktop-load-locked-desktop '(nil ask))
                   (or (null desktop-load-locked-desktop)
+                      (daemonp)
                       (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\
 Using it may cause conflicts.  Use it anyway? " owner)))))
              (let ((default-directory desktop-dirname))