From: "Drew Adams" <drew.adams@oracle.com>
To: "'Nix'" <nix@esperi.org.uk>, "'Leo'" <sdl.web@gmail.com>
Cc: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <2804FA49EF2E416D896C588C602E9B18@us.oracle.com> (raw)
In-Reply-To: <87k40m290q.fsf@spindle.srvr.nix>
> >> 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.
prev parent reply other threads:[~2012-05-08 14:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1SQUYc-0000HU-Hb@vcs.savannah.gnu.org>
2012-05-05 3:08 ` /srv/bzr/emacs/trunk r108127: New function set-temporary-overlay-map and macros (defvar|setq)-local Leo
2012-05-05 3:37 ` Stefan Monnier
2012-05-05 13:05 ` Johan Bockgård
2012-05-06 2:49 ` Leo
2012-05-06 15:45 ` Stefan Monnier
2012-05-05 14:58 ` Leo
2012-05-06 1:39 ` Stefan Monnier
2012-05-06 2:47 ` Leo
2012-05-08 11:43 ` Nix
2012-05-08 14:12 ` Drew Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2804FA49EF2E416D896C588C602E9B18@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=nix@esperi.org.uk \
--cc=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.