;; 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,
(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")
"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.
: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'.
(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
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))
(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).