[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: /srv/bzr/emacs/trunk r108127: New functionset-temporary-overlay-map
From: |
Drew Adams |
Subject: |
RE: /srv/bzr/emacs/trunk r108127: New functionset-temporary-overlay-map and macros (defvar|setq)-local. |
Date: |
Tue, 8 May 2012 07:12:57 -0700 |
> >> Oh, yes, I always disliked this use, so obviously I didn't
> >> add it to setq-local.
> >
> > I don't like that much either. but I am concerned about consistency
> > between these setq* special forms.
>
> More generally, some people (e.g. me) *do* like it, and are
> unlikely to use setq-local in our own code if it doesn't support
> something similar.
Not that I really care much about this... but FWIW -
For years I tended not to use `setq' for more than one assignment, feeling much
as what Stefan apparently feels. A few years back I started to change (I don't
recall why). And now I'm pretty much on the other side of the fence.
In general, I now find the multiple-assignment form more readable (less noise)
and lower maintenance. It is especially more readable to group assignments if
they are closely related. But even just in terms of general readability, I find
A better than B:
A:
(if whatever
(setq alpha (+ (beta) gamma)
delta epsilon
iota-omega (pool-fni dne-on))
(do-this)
(do-that)
(do-more)
(enough-already))
B:
(if whatever
(progn
(setq alpha (+ (beta) gamma))
(setq delta epsilon
(setq iota-omega (pool-fni dne-on)))
(do-this)
(do-that)
(do-more)
(enough-already))
Again, FWIW/YMMV. And if you argue that without clear layout it can be
confusing, I agree. Which is why I don't write it this way:
(setq alpha (+ (beta) gamma) delta
epsilon iota-omega (pool-fni dne-on))
So I think it's good for Emacs to support such syntax for `setq-local', other
things being equal (are they?). Nothing requires anyone to use it. And it is
consistent with setq, etc.