[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).
- `when' vs. `and' / `unless' vs `or', Garreau, Alexandre, 2018/10/16
- RE: `when' vs. `and' / `unless' vs `or', Drew Adams, 2018/10/16
- Re: `when' vs. `and' / `unless' vs `or', Garreau, Alexandre, 2018/10/16
- RE: `when' vs. `and' / `unless' vs `or', Drew Adams, 2018/10/16
- Re: `when' vs. `and' / `unless' vs `or', Garreau, Alexandre, 2018/10/16
- RE: `when' vs. `and' / `unless' vs `or',
Drew Adams <=
- Re: `when' vs. `and' / `unless' vs `or', Garreau, Alexandre, 2018/10/16
- RE: `when' vs. `and' / `unless' vs `or', Drew Adams, 2018/10/16
- Re: `when' vs. `and' / `unless' vs `or', Garreau, Alexandre, 2018/10/17
- Message not available
- Re: `when' vs. `and' / `unless' vs `or', Emanuel Berg, 2018/10/17
- Re: `when' vs. `and' / `unless' vs `or', Michael Heerdegen, 2018/10/17