summaryrefslogtreecommitdiff
path: root/lisp/completion.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2008-10-24 09:39:27 +0000
committerJuanma Barranquero <lekktu@gmail.com>2008-10-24 09:39:27 +0000
commitd6c180c46bcd0e492695aefee576d51a7bdf32e6 (patch)
tree5c234b6bd9501b91148dc39777f612b9fc1cadd8 /lisp/completion.el
parentecd43cb971723a8573afaa4ba6c8d50de7aa6db5 (diff)
downloademacs-d6c180c46bcd0e492695aefee576d51a7bdf32e6.tar.gz
New function `locate-user-emacs-file'.
* subr.el (locate-user-emacs-file): New function. (user-emacs-directory): Mention it in docstring. * completion.el (save-completions-file-name): * filesets.el (filesets-menu-cache-file): * image-dired.el (image-dired-dir, image-dired-db-file) (image-dired-temp-image-file, image-dired-gallery-dir) (image-dired-temp-rotate-image-file): * savehist.el (savehist-file): * server.el (server-auth-dir): * startup.el (auto-save-list-file-prefix): * thumbs.el (thumbs-thumbsdir): * tutorial.el (tutorial--saved-dir): * play/gamegrid.el (gamegrid-user-score-file-directory): Use it. * url.el (url-configuration-directory): Use `locate-user-emacs-file'. * NEWS: New function `locate-user-emacs-file'.
Diffstat (limited to 'lisp/completion.el')
-rw-r--r--lisp/completion.el8
1 files changed, 1 insertions, 7 deletions
diff --git a/lisp/completion.el b/lisp/completion.el
index 6a5c06a62b6..2f925dd2066 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -296,13 +296,7 @@ See also `save-completions-retention-time'."
:group 'completion)
(defcustom save-completions-file-name
- (let ((olddef (convert-standard-filename "~/.completions")))
- (cond
- ((file-readable-p olddef) olddef)
- ((file-directory-p user-emacs-directory)
- (convert-standard-filename
- (expand-file-name "completions" user-emacs-directory)))
- (t olddef)))
+ (locate-user-emacs-file "completions" ".completions")
"The filename to save completions to."
:type 'file
:group 'completion)