(vc-mcvs-checkin): Use mapc rather than mapcar.
[bpt/emacs.git] / lisp / desktop.el
index d9939ac..bddba82 100644 (file)
@@ -11,7 +11,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -204,7 +204,7 @@ the normal hook `desktop-not-loaded-hook' is run."
     (const :tag "Don't load" nil)
     (const :tag "Ask the user" ask))
   :group 'desktop
-  :version "22.2")
+  :version "23.1")
 
 (defcustom desktop-base-file-name
   (convert-standard-filename ".emacs.desktop")
@@ -219,7 +219,7 @@ the normal hook `desktop-not-loaded-hook' is run."
   "Name of lock file for Emacs desktop, excluding the directory part."
   :type 'file
   :group 'desktop
-  :version "22.2")
+  :version "23.1")
 
 (defcustom desktop-path '("." "~")
   "List of directories to search for the desktop file.
@@ -253,7 +253,7 @@ May be used to deal with accidental multiple Emacs jobs."
   :type 'hook
   :group 'desktop
   :options '(desktop-save-mode-off save-buffers-kill-emacs)
-  :version "22.2")
+  :version "23.1")
 
 (defcustom desktop-after-read-hook nil
   "Normal hook run after a successful `desktop-read'.
@@ -652,7 +652,7 @@ is nil, ask the user where to save the desktop."
   (set-buffer buffer)
   (list
    ;; basic information
-   (desktop-file-name (buffer-file-name) dirname)
+   (desktop-file-name (buffer-file-name) desktop-dirname)
    (buffer-name)
    major-mode
    ;; minor modes
@@ -673,7 +673,7 @@ is nil, ask the user where to save the desktop."
    buffer-read-only
    ;; auxiliary information
    (when (functionp desktop-save-buffer)
-     (funcall desktop-save-buffer dirname))
+     (funcall desktop-save-buffer desktop-dirname))
    ;; local variables
    (let ((locals desktop-locals-to-save)
         (loclist (buffer-local-variables))
@@ -896,7 +896,7 @@ See also `desktop-base-file-name'."
                (insert "\n  " (desktop-value-to-string e)))
              (insert ")\n\n")))
 
-         (setq default-directory dirname)
+         (setq default-directory desktop-dirname)
          (let ((coding-system-for-write 'emacs-mule))
            (write-region (point-min) (point-max) (desktop-full-file-name) nil 'nomessage))
          ;; We remember when it was modified (which is presumably just now).