diff options
| author | Juanma Barranquero | 2013-06-20 23:58:29 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2013-06-20 23:58:29 +0200 |
| commit | 1493c2af6593ebabc5c966d1162812456efbee24 (patch) | |
| tree | a41875d1f678dd44e80990b7f589424592924a79 | |
| parent | aff6371e3281f4da696093806b1658cb48670a76 (diff) | |
| download | emacs-1493c2af6593ebabc5c966d1162812456efbee24.tar.gz emacs-1493c2af6593ebabc5c966d1162812456efbee24.zip | |
lisp/term/x-win.el (emacs-session-filename): Use `locate-user-emacs-file'.
| -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 @@ | |||
| 1 | 2013-06-20 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * term/x-win.el (emacs-session-filename): Use `locate-user-emacs-file'. | ||
| 4 | |||
| 1 | 2013-06-20 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2013-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. |
| 121 | If the directory ~/.emacs.d exists, we make a filename in there, otherwise | 121 | Return a filename in `user-emacs-directory', unless the session file |
| 122 | a file in the home directory." | 122 | already 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. |