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

Auto filling bugs



Here are a couple of problems that have been noticed by Phil Agre
and me when we use my FILCOM library.  FILCOM sets up a command
hook that auto-fills Lisp comments -- it checks whether point is
in a comment, and then calls the normal Zwei auto-fill hook.
Thus, these problems occur without FILCOM -- just turn on Auto
Fill mode inside Lisp mode.

I think the most important problem is that breaking a line
doesn't start the next line's comment in the same comment column.
EMACS will copy the comment column from the previous line (as
well as copying the number of ";"s and the whitespace after them,
as does Zwei).  A particular case is when there is a single ; in
column 0 -- I believe EMACS treats that special when indenting
several lines, for example.

The other problem is that when typing new words into the middle
of a comment, the words at the end of the comment line break off
into separate comment lines -- they don't merge with the next
line's comment.  Auto-filling will merge plain (non-comment) text
into the next line, but not comments.  Thus you end up with
something like:

;;; lkj lkj lkj lkj lkj lkj new stuff here lkj lkj lkj lkj lkj
;;; lkj lkj lkj
;;; lkj lkj lkj lkj lkj lkj lkj lkj lkj lkj lkj lkj lkj lkj

Any ideas on this?