Fix whitespaces in xdg-paths.el
This commit is contained in:
parent
26a65a7bd4
commit
cf9dd26378
@ -151,7 +151,7 @@ This directory is added to \\[load-path].")
|
||||
If the command fails, return NIL."
|
||||
(let ((command (concat "xdg-user-dir " dirname)))
|
||||
(if (zerop (shell-command command))
|
||||
(substring (shell-command-to-string command) 0 -1)
|
||||
(substring (shell-command-to-string command) 0 -1)
|
||||
nil)))
|
||||
|
||||
|
||||
@ -171,13 +171,13 @@ If 'documents, it will be located in user-documents-directory.
|
||||
If the category is wrong, an error will be signaled.
|
||||
"
|
||||
(expand-file-name filename
|
||||
(case type
|
||||
((nil data) user-emacs-data-directory)
|
||||
('config user-emacs-config-directory)
|
||||
('lisp user-emacs-lisp-directory)
|
||||
('cache user-emacs-cache-directory)
|
||||
('documents user-documents-directory)
|
||||
(t (error "The category %s is not valid" type)))))
|
||||
(case type
|
||||
((nil data) user-emacs-data-directory)
|
||||
('config user-emacs-config-directory)
|
||||
('lisp user-emacs-lisp-directory)
|
||||
('cache user-emacs-cache-directory)
|
||||
('documents user-documents-directory)
|
||||
(t (error "The category %s is not valid" type)))))
|
||||
|
||||
|
||||
(defun locate-user-config-file (filename)
|
||||
@ -208,10 +208,10 @@ it to `load-path`."
|
||||
|
||||
;; Set the default variables if they have no name.
|
||||
(macrolet ((setq-if-null (variable value)
|
||||
`(if (null ,variable)
|
||||
(setf ,variable ,value)))
|
||||
(getdir (variable fallback)
|
||||
`(expand-file-name "emacs/" (or (getenv ,variable) ,fallback))))
|
||||
`(if (null ,variable)
|
||||
(setf ,variable ,value)))
|
||||
(getdir (variable fallback)
|
||||
`(expand-file-name "emacs/" (or (getenv ,variable) ,fallback))))
|
||||
(setq-if-null user-emacs-config-directory (getdir "XDG_CONFIG_HOME" "~/.config/"))
|
||||
(setq-if-null user-emacs-data-directory (getdir "XDG_DATA_HOME" "~/.local/share/"))
|
||||
(setq-if-null user-emacs-cache-directory (getdir "XDG_CACHE_HOME" "~/.cache/"))
|
||||
|
Loading…
Reference in New Issue
Block a user