[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do i say it in emacs lisp
From: |
Thien-Thi Nguyen |
Subject: |
Re: How do i say it in emacs lisp |
Date: |
Wed, 21 Dec 2016 19:19:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
() Matthias Pfeifer <matthias-pfeifer@outlook.com>
() Mon, 28 Nov 2016 11:50:32 +0000
Second opinion is welcome :-)
Cool.
(let* (...
(neo-buf nil)
(other-buf nil)
(neo-wnd nil)
(other-wnd nil)
(filename nil)
...)
You can write these w/o the ‘nil’ and even w/o the per-var
parens. Conventionally, such vars are grouped at the end of the
‘let’ VARLIST block, e.g.: (let* ((v1 1) (v2 2) v3 v4 v5) ...).
(when (and neo-buffer
(or (eq buf-0 neo-buffer)
(eq buf-1 neo-buffer)))
presuming ‘buf-0’ and ‘buf-1’ are never nil, you can use ‘memq’:
(when (memq neo-buffer (list buf-0 buf-1))
This constructs a list and discards it after the ‘memq’ so maybe
not too indicated if gratuitous garbage goes against your grain.
(progn
This is superfluous; (when (progn ...)) ≡ (when ...) in meaning.
Same goes for the other ‘progn’.
--
Thien-Thi Nguyen -----------------------------------------------
(defun responsep (type via)
(case type
(technical (eq 'mailing-list via))
...)) 748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: How do i say it in emacs lisp,
Thien-Thi Nguyen <=