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

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

Re: How to delete all nil properties from a plist?


From: Emanuel Berg
Subject: Re: How to delete all nil properties from a plist?
Date: Sun, 09 Aug 2015 04:28:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

"Pascal J. Bourguignon" <pjb@informatimago.com>
writes:

> Compare those two forms:
>
>          (if (and (some-predicate-p a) (= a 1) (print (list a (some-function 
> a))))
>             (print b))
>          (if (and (some-predicate-p a) (= a 1)) (print (list a (some-function 
> a)))
>             (print b))
>
>
> and then compare those two forms:
>
>          (when (and (some-predicate-p a) (= a 1) (print (list a 
> (some-function a))))
>             (print b))
>          (if (and (some-predicate-p a) (= a 1))
>             (print (list a (some-function a)))
>             (print b))

This problem is not a consequence of writing the
"then" branch on the same line but having the
condition complicated and too long lines in general.

If you don't do neither there is nothing wrong with
having not only the "then" branch but *both* branches
on the same line:

    (if long "&filters=long&lclk=long" "")

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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