emacs-pretest-bug
[Top][All Lists]
Advanced

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

fill comment problem


From: Markus Rost
Subject: fill comment problem
Date: Wed, 03 Mar 2004 02:06:39 +0100

Add the line at the beginning of buffer *scratch* as indicated:

===Buffer *scratch*=========================================
; hi
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.

============================================================

Put point on the first line and type M-q (fill-paragraph).  You get no
visible changes.  I think this is correct. 

Put point on the second line (say before the "T") and type M-q.  You
get a mess:

===Buffer *scratch*=========================================
; hi ; This buffer is for notes you don't want to save, and for Lisp
;evaluation.  ; If you want to create a file, visit that file with C-x
;C-f, ; then enter the text in that file's own buffer.

============================================================

This is certainly a bug.

Another experiment:  Start with

===Buffer *scratch*=========================================
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
; hi

============================================================

With point on the first 3 lines, you get from M-q

===Buffer *scratch*=========================================
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
; hi

============================================================

In this case the first 3 lines are formatted, and the 4th line is left
unchanged.  I think this is correct.

With point on the 4th line, you get from M-q

===Buffer *scratch*=========================================
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.  hi

============================================================

You may also experiment with

===Buffer *scratch*=========================================
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
;;;;;;; hi

============================================================

to get from M-q on the 4th line

===Buffer *scratch*=========================================
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.  ;;;;; hi
============================================================

In general I think that comments with different numbers of comment
characters should not be mixed by formatting.  For instance for some
languages I am using comments like

### A headline
## A remark about the code
# some code not to be used right now
code to used

M-q should not mix any of these four lines, I think.





reply via email to

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