emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comment-add


From: Tassilo Horn
Subject: Re: comment-add
Date: Tue, 06 Nov 2007 21:59:34 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     I noticed the new default behavior and didn't like it---it turns
>     every line of the commented region into a headline matching
>     outline-regexp (and gets font-locked due to some snippets in my
>     .emacs). Is this really what was intended?
>
> That is a peculiar advanced usage mode, not a significant factor for a
> decision about defaults.

But the docs explicitly mention this "peculiar advanced usage mode".

,----[ (info "(elisp)Comment Tips") ]
| `;;;'
|      Comments that start with three semicolons, `;;;', should start at
|      the left margin.  These are used, occasionally, for comments within
|      functions that should start at the margin.  We also use them
|      sometimes for comments that are between functions--whether to use
|      two or three semicolons depends on whether the comment should be
|      considered a "heading" by Outline minor mode.  By default,
|      comments starting with at least three semicolons (followed by a
|      single space and a non-whitespace character) are considered
|      headings, comments starting with two or less are not.
| 
|      Another use for triple-semicolon comments is for commenting out
|      lines within a function.  We use three semicolons for this
|      precisely so that they remain at the left margin.  By default,
|      Outline minor mode does not consider a comment to be a heading
|      (even if it starts with at least three semicolons) if the
|      semicolons are followed by at least two spaces.  Thus, if you add
|      an introductory comment to the commented out code, make sure to
|      indent it by at least two spaces after the three semicolons.
| 
|           (defun foo (a)
|           ;;;  This is no longer necessary.
|           ;;;  (force-mode-line-update)
|             (message "Finished with %s" a))
| 
|      When commenting out entire functions, use two semicolons.
`----

Maybe we could all be happy if we change the new behavior to insert
three semicolons followed by two spaces?

Bye,
Tassilo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]