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

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

RE: `when' vs. `and' / `unless' vs `or'


From: Drew Adams
Subject: RE: `when' vs. `and' / `unless' vs `or'
Date: Tue, 16 Oct 2018 17:16:14 -0700 (PDT)

> (if (or cond cond) then else) than, canonically (and (not (and (or cond
> cond) then)) else) (not sure about a simplified version), which is the
> way to write it without an `if', as you said you didn’t use it if the
> condition was more than a single sexp.

As I (think I) said, I use (if (or cond cond) then else), if THEN is a single 
sexp.

If THEN is not a single step I don't bother to use
(if (or cond cond) (progn THEN1 THEN2...)) else).

---

BTW, for transforming sexps with `not', `and', and `or', for readability
or for performance reasons, I sometimes use `notandor.el'.

https://www.emacswiki.org/emacs/NotAndOr

Also, package `el-search.el' has similar possibilities (and many other
good things).



reply via email to

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