aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2013-06-20 23:58:29 +0200
committerJuanma Barranquero2013-06-20 23:58:29 +0200
commit1493c2af6593ebabc5c966d1162812456efbee24 (patch)
treea41875d1f678dd44e80990b7f589424592924a79
parentaff6371e3281f4da696093806b1658cb48670a76 (diff)
downloademacs-1493c2af6593ebabc5c966d1162812456efbee24.tar.gz
emacs-1493c2af6593ebabc5c966d1162812456efbee24.zip
lisp/term/x-win.el (emacs-session-filename): Use `locate-user-emacs-file'.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/term/x-win.el12
2 files changed, 9 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e080df38bf0..0ae2a09cc4c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12013-06-20 Juanma Barranquero <lekktu@gmail.com>
2
3 * term/x-win.el (emacs-session-filename): Use `locate-user-emacs-file'.
4
12013-06-20 Stefan Monnier <monnier@iro.umontreal.ca> 52013-06-20 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * emacs-lisp/cl-loaddefs.el: Don't version-control any more. 7 * emacs-lisp/cl-loaddefs.el: Don't version-control any more.
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 822df0e37e5..ab1556d5779 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -118,13 +118,11 @@ See also `emacs-session-save'.")
118 118
119(defun emacs-session-filename (session-id) 119(defun emacs-session-filename (session-id)
120 "Construct a filename to save the session in based on SESSION-ID. 120 "Construct a filename to save the session in based on SESSION-ID.
121If the directory ~/.emacs.d exists, we make a filename in there, otherwise 121Return a filename in `user-emacs-directory', unless the session file
122a file in the home directory." 122already exists in the home directory."
123 (let ((basename (concat "session." session-id)) 123 (let ((basename (concat "session." session-id)))
124 (emacs-dir user-emacs-directory)) 124 (locate-user-emacs-file basename
125 (expand-file-name (if (file-directory-p emacs-dir) 125 (concat ".emacs-" basename))))
126 (concat emacs-dir basename)
127 (concat "~/.emacs-" basename)))))
128 126
129(defun emacs-session-save () 127(defun emacs-session-save ()
130 "This function is called when the window system is shutting down. 128 "This function is called when the window system is shutting down.