Function: xdg--dir-home

xdg--dir-home is a macro defined in xdg.el.gz.

Signature

(xdg--dir-home ENVIRON DEFAULT-PATH)

Source Code

;; Defined in /usr/src/emacs/lisp/xdg.el.gz
;; 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))))