help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: operations on path lists


From: Emanuel Berg
Subject: Re: operations on path lists
Date: Sat, 04 Feb 2023 22:41:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Jean Louis wrote:

>>> (cond ((file-directory-p file) (expand-file-name file))
>>>       (t nil))
>> 
>> (when (file-directory-p file)
>>   (expand-file-name file) )
>
> I am aware of it, I prefer using `cond' as I get
> more clarity.

The (t nil) part is of no use, even if you stick to `cond'.

  "If no clause succeeds, cond returns nil."

And: one COND, one branch or BODY - in idiomatic Lisp, that's
`when'.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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