From 1493c2af6593ebabc5c966d1162812456efbee24 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 20 Jun 2013 23:58:29 +0200 Subject: [PATCH] lisp/term/x-win.el (emacs-session-filename): Use `locate-user-emacs-file'. --- lisp/ChangeLog | 4 ++++ lisp/term/x-win.el | 12 +++++------- 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 @@ +2013-06-20 Juanma Barranquero + + * term/x-win.el (emacs-session-filename): Use `locate-user-emacs-file'. + 2013-06-20 Stefan Monnier * 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'.") (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. -- 2.39.2