unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jack Duthen <duthen.mac.01@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 11636@debbugs.gnu.org
Subject: bug#11636: 23.1; wrong comment indentation
Date: Thu, 7 Jun 2012 11:10:02 +0200	[thread overview]
Message-ID: <CALGVPOqqUXUsNJuuB5dVu=h=064no=bhg13J9CKuq8iO=6776w@mail.gmail.com> (raw)
In-Reply-To: <jwvaa0gk2gm.fsf-monnier+emacs@gnu.org>

Ok.  Many thanks for the explanation.
I made a mistake. (I'm sorry about that...)
So, I just read carefully the docs to understand what happened.

I didn't know `comment-dwim' (maybe it's new since emacs 14...)
and believed the action of M-; was just to insert or reindent
a comment past the right end of a normal code instruction,
but it seems to do much more.

The documentation of the function `comment-dwim' itself
does not refer to the behaviour of the variable `fill-column',
but it refers to the function `comment-indent',
whose documentation refers to the variable `comment-column',
whose documentation refers to the variable `comment-fill-column',
whose documentation refers to the variable `fill-column'.

So, yes, the documentation describes clearly (sic!)
the behaviour you reminded me in your answer!
(I should have RTFM! and apologize!)

Nevertheless there is no such reference in the Emacs info:
30.5 Manipulating Comments
and its sections (30.5.1 30.5.2 30.5.3):
* Comment Commands::    Inserting, killing, and aligning comments.
* Multi-Line Comments:: Commands for adding and editing multi-line comments.
* Options for Comments::Customizing the comment features.

(though 30.5.2 refers to `auto-fill-mode' (which is not in use
in my example))

Also if you lookup-subject-in-emacs-manual or -in-elisp-manual
with comment-fill-column, you will find no reference to it.

Maybe there should be a word about it in §30.5.1 or §30.5.3 ?


2012/6/6 Stefan Monnier <monnier@iro.umontreal.ca>:
>>     (jd-re-or "COM_writeLog 1")         ;
>>     (jd-re-paren
>>      "return ")                       ; \2 <msg> \n <spaces> "return "
>>     (jd-re-paren "[0-9]"))            ;
>>    "COM_log \\3\\2\\3"))
> [...]
>> Is this a bug?
>
> I don't think so:
> - The second comment is not moved to the same column as the first
>  because that would push the text past fill-column.  If you shorten the
>  second comment or if you increase fill-column, then the 3 comments
>  will be aligned.
> - The first is not moved to the same column as the second because Emacs
>  doesn't look past a non-commented line.  If you add a comment on the
>  `jd-re-paren' line, then Emacs will look further and will align all
>  4 comments.
>
>        Stefan





  reply	other threads:[~2012-06-07  9:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-06 10:47 bug#11636: 23.1; wrong comment indentation Jack Duthen
2012-06-06 13:18 ` Stefan Monnier
2012-06-07  9:10   ` Jack Duthen [this message]
2018-02-14  3:14     ` Noam Postavsky
2018-02-14  4:44       ` Eli Zaretskii
2018-02-15  1:36         ` Noam Postavsky
2018-02-15 16:24           ` Eli Zaretskii
2018-02-17  3:25             ` Noam Postavsky

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALGVPOqqUXUsNJuuB5dVu=h=064no=bhg13J9CKuq8iO=6776w@mail.gmail.com' \
    --to=duthen.mac.01@gmail.com \
    --cc=11636@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).