From: Stefan Monnier Date: Tue, 26 Oct 2021 15:39:32 +0000 (-0400) Subject: * lisp/xdg.el (xdg--dir-home): Make it a function X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~3291^2~457 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=58e271fc5e4a992e5352f69cc8c87aa61433129a;p=emacs.git * lisp/xdg.el (xdg--dir-home): Make it a function --- diff --git a/lisp/xdg.el b/lisp/xdg.el index aee0dcad67f..05fc3d711aa 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.