diff options
| author | Juanma Barranquero <lekktu@gmail.com> | 2013-06-20 23:58:29 +0200 |
|---|---|---|
| committer | Juanma Barranquero <lekktu@gmail.com> | 2013-06-20 23:58:29 +0200 |
| commit | 1493c2af6593ebabc5c966d1162812456efbee24 (patch) | |
| tree | a41875d1f678dd44e80990b7f589424592924a79 /lisp | |
| parent | aff6371e3281f4da696093806b1658cb48670a76 (diff) | |
| download | emacs-1493c2af6593ebabc5c966d1162812456efbee24.tar.gz | |
lisp/term/x-win.el (emacs-session-filename): Use `locate-user-emacs-file'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | 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 <lekktu@gmail.com> + + * term/x-win.el (emacs-session-filename): Use `locate-user-emacs-file'. + 2013-06-20 Stefan Monnier <monnier@iro.umontreal.ca> * 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. |
