GNU bug report logs - #11636
23.1; wrong comment indentation

Previous Next

Package: emacs;

Reported by: Jack Duthen <duthen.mac.01 <at> gmail.com>

Date: Wed, 6 Jun 2012 10:52:01 UTC

Severity: minor

Tags: patch

Found in version 23.1

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Jack Duthen <duthen.mac.01 <at> gmail.com>
Cc: 11636 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#11636: 23.1; wrong comment indentation
Date: Tue, 13 Feb 2018 22:14:14 -0500
[Message part 1 (text/plain, inline)]
tags 11636 + patch
quit

Jack Duthen <duthen.mac.01 <at> gmail.com> writes:

> 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 ?

How about this:

[v1-0001-Document-comment-fill-column-in-the-manual-Bug-11.patch (text/x-diff, inline)]
From 8f455ca6dfe5361783bf3e897527816f558dd9c9 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Tue, 13 Feb 2018 22:10:03 -0500
Subject: [PATCH v1] Document comment-fill-column in the manual (Bug#11636)

* doc/emacs/programs.texi (Comment Commands)
(Options for Comments): Mention comment-fill-column.
---
 doc/emacs/programs.texi | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 4289124545..6c650a4ccf 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -989,7 +989,8 @@ Comment Commands
 @key{TAB} would indent to (@pxref{Basic Indent}).  If the line is
 non-blank, the comment is placed after the last non-whitespace
 character on the line; normally, Emacs tries putting it at the column
-specified by the variable @code{comment-column} (@pxref{Options for
+specified by the variable @code{comment-column} while keeping the end
+of the comment within @code{comment-fill-column} (@pxref{Options for
 Comments}), but if the line already extends past that column, it puts
 the comment at some suitable position, usually separated from the
 non-comment text by at least one space.  In each case, Emacs places
@@ -1088,13 +1089,17 @@ Options for Comments
 @subsection Options Controlling Comments
 
 @vindex comment-column
+@vindex comment-fill-column
 @kindex C-x ;
 @findex comment-set-column
   As mentioned in @ref{Comment Commands}, when the @kbd{M-j} command
-adds a comment to a line, it tries to place the comment at the column
-specified by the buffer-local variable @code{comment-column}.  You can
-set either the local value or the default value of this buffer-local
-variable in the usual way (@pxref{Locals}).  Alternatively, you can
+adds a comment to a line, it tries to place the comment starting at
+the column specified by the buffer-local variable
+@code{comment-column} and ending before @code{comment-fill-column} (or
+if that is @code{nil}, then the value of @code{fill-column},
+@pxref{Fill Commands}).  You can set either the local value or the
+default value of these buffer-local variables in the usual way
+(@pxref{Locals}).  Alternatively, you can
 type @kbd{C-x ;} (@code{comment-set-column}) to set the value of
 @code{comment-column} in the current buffer to the column where point
 is currently located.  @kbd{C-u C-x ;} sets the comment column to
-- 
2.11.0


This bug report was last modified 7 years and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.