[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add XDG utility library
From: |
Mark Oteiza |
Subject: |
Re: [PATCH] Add XDG utility library |
Date: |
Wed, 1 Feb 2017 07:14:13 -0500 |
User-agent: |
Mutt/1.7.2+27 (e4ad1dc9bfbd) (2016-11-26) |
On 01/02/17 at 11:19am, Philipp Stephani wrote:
> Mark Oteiza <address@hidden> schrieb am Mi., 1. Feb. 2017 um 01:28 Uhr:
>
> >
> > +(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))))
> >
>
> Maybe I'm missing something, but why is this a macro and not a normal
> function?
Because its only use is the write the body of a few functions.