summaryrefslogtreecommitdiff
path: root/lisp/term/x-win.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2013-06-20 23:58:29 +0200
committerJuanma Barranquero <lekktu@gmail.com>2013-06-20 23:58:29 +0200
commit1493c2af6593ebabc5c966d1162812456efbee24 (patch)
treea41875d1f678dd44e80990b7f589424592924a79 /lisp/term/x-win.el
parentaff6371e3281f4da696093806b1658cb48670a76 (diff)
downloademacs-1493c2af6593ebabc5c966d1162812456efbee24.tar.gz
lisp/term/x-win.el (emacs-session-filename): Use `locate-user-emacs-file'.
Diffstat (limited to 'lisp/term/x-win.el')
-rw-r--r--lisp/term/x-win.el12
1 files changed, 5 insertions, 7 deletions
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'.")
(defun emacs-session-filename (session-id)
"Construct a filename to save the session in based on SESSION-ID.
-If the directory ~/.emacs.d exists, we make a filename in there, otherwise
-a file in the home directory."
- (let ((basename (concat "session." session-id))
- (emacs-dir user-emacs-directory))
- (expand-file-name (if (file-directory-p emacs-dir)
- (concat emacs-dir basename)
- (concat "~/.emacs-" basename)))))
+Return a filename in `user-emacs-directory', unless the session file
+already exists in the home directory."
+ (let ((basename (concat "session." session-id)))
+ (locate-user-emacs-file basename
+ (concat ".emacs-" basename))))
(defun emacs-session-save ()
"This function is called when the window system is shutting down.