* lisp/xdg.el (xdg--dir-home): Make it a function
This commit is contained in:
parent
5861b8d027
commit
58e271fc5e
1 changed files with 5 additions and 7 deletions
12
lisp/xdg.el
12
lisp/xdg.el
|
@ -41,13 +41,11 @@
|
|||
;; XDG Base Directory Specification
|
||||
;; https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
|
||||
(defmacro xdg--dir-home (environ default-path)
|
||||
(declare (debug (stringp stringp)))
|
||||
(let ((env (make-symbol "env")))
|
||||
`(let ((,env (getenv ,environ)))
|
||||
(if (or (null ,env) (not (file-name-absolute-p ,env)))
|
||||
(expand-file-name ,default-path)
|
||||
,env))))
|
||||
(defun xdg--dir-home (environ default-path)
|
||||
(let ((env (getenv environ)))
|
||||
(if (or (null env) (not (file-name-absolute-p env)))
|
||||
(expand-file-name default-path)
|
||||
env)))
|
||||
|
||||
(defun xdg-config-home ()
|
||||
"Return the base directory for user specific configuration files.
|
||||
|
|
Loading…
Add table
Reference in a new issue