* how to get M-; pre-Emacs 22 behavior
@ 2010-12-22 0:17 Drew Adams
2010-12-22 22:56 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2010-12-22 0:17 UTC (permalink / raw
To: 'Emacs-Devel devel'
Is there a simple way to tell Emacs to use the `M-;' indenting that was
available before Emacs 22? This is what it does now (22+):
(if (xxxxxxxxxxxxxxxxx)
(yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy) ; Y's comment
(zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)) ; Z's comment
(if (xxxxxxxxxxxxxxxxx)
(yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy)
(zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)) ; Z's comment
Prior to Emacs 22 both Z comments had the same indentation: the indentation of
the second example.
I prefer that. To me, there is little reason to align a comment for one `if'
branch with a comment for the other branch (no more reason than aligning the
sexps for the two branches).
Is there some option today that gives the pre-22 behavior?
Note that the older `M-;' indenting still did align comments generally, but not
in the case of `if' branches. E.g., this example from (elisp) `Comment Tips' is
very old, and in Emacs 20 the same alignment was used:
(setq base-version-list ; there was a base
(assoc (substring fn 0 start-vn) ; version to which
file-version-assoc-list)) ; this looks like
; a subversion
Such alignment can be good esp. for comments like the one shown, which
(logically) extend over several lines. It does not make much sense (IMHO) for
the different branches of an `if'. I prefer this:
(if (xxxxxxxxxxxxxxxxx)
(yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy) ; Y's comment
(zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) ; Z's comment which is
(zzzzzzzzzzz)) ; long and so continues
With the 22+ indenting, which code is targeted by comment lines is less clear,
IMO. With everything aligned it's harder to see where one comment ends and
another begins.
Simple option choice somewhere?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: how to get M-; pre-Emacs 22 behavior
2010-12-22 0:17 how to get M-; pre-Emacs 22 behavior Drew Adams
@ 2010-12-22 22:56 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2010-12-22 22:56 UTC (permalink / raw
To: Drew Adams; +Cc: 'Emacs-Devel devel'
> Is there a simple way to tell Emacs to use the `M-;' indenting that was
> available before Emacs 22? This is what it does now (22+):
No, there isn't.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-22 22:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-22 0:17 how to get M-; pre-Emacs 22 behavior Drew Adams
2010-12-22 22:56 ` Stefan Monnier
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.