emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] :mkdirp without path specifier


From: Achim Gratz
Subject: Re: [O] :mkdirp without path specifier
Date: Sat, 03 May 2014 10:19:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

R. Michael Weylandt writes:
>                     ;; Possibly create the parent directories for file.
>                     (when (let ((m (funcall get-spec :mkdirp)))
>                                (and m (not (string= m "no"))))
> -                     (make-directory (file-name-directory file-name) 
> 'parents))
> +                     (if (file-name-directory file-name)
> +                         (make-directory (file-name-directory file-name) 
> 'parents)))

If the else clause is intentionally missing, some folks prefer to use
"when" instead of "if" to advertise that fact (see some surrounding code
for example).  In this case the additional "if" should be rolled into
the condition check of the former "when" anyway (and let-bind the result
to avoid the duplicate "file-name-directory" call).  The conditional is
actually superfluous since we can short-circuit from the "and".

A patch to that effect has been installed in 063c8b03b7.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




reply via email to

[Prev in Thread] Current Thread [Next in Thread]