[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 58e271f: * lisp/xdg.el (xdg--dir-home): Make it a function
From: |
Stefan Monnier |
Subject: |
master 58e271f: * lisp/xdg.el (xdg--dir-home): Make it a function |
Date: |
Mon, 8 Nov 2021 14:11:38 -0500 (EST) |
branch: master
commit 58e271fc5e4a992e5352f69cc8c87aa61433129a
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/xdg.el (xdg--dir-home): Make it a function
---
lisp/xdg.el | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/lisp/xdg.el b/lisp/xdg.el
index aee0dca..05fc3d7 100644
--- a/lisp/xdg.el
+++ b/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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 58e271f: * lisp/xdg.el (xdg--dir-home): Make it a function,
Stefan Monnier <=