No. 232 - indent-new-comment-line misbehaviour

Andreas Röhler andreas.roehler at online.de
Tue Mar 11 06:31:45 EDT 2008


Hi all,

during last years I watched the show ups of several
rather elementary bugs as No. 232,
"indent-new-comment-line misbehaviour?", which doesn't
pertain to a new or exotic language.

Looking for the causes of this and other bugs, I came
to the conclusion: the basic responsible is the design,
is the way commenting presently is implemented.

Or put it vice versa: patching a bug in present
conditions IMO bears a high risk to produce the next
bug in your back.

To start with the less important: some of the routines
in newcomment.el are very intrinsic. Too they contain a
lot of circulars, calling themselves again and
again. This makes debugging labourious.

IMO this complexity must not be, it's possible to make
it much easier to read and follow.

So far I'm considering a patch during next weeks.

The second point needs your advice:

Presently it's not easy to detect for the user where a
variable like `comment-column' is set. He or she may
look into newcomment.el, see `defcustom comment-column'
there and customize it.

However, that value might be overridden by
`lisp-mode-variables' which uses a hard-coded value.

That's just an example, there are more clashes of this
kind around.

IMO the right place to put in defcustom-forms for
commenting are the programming modes. So I'll delete
this forms in my new comment.el and introduce it there?

What's your opinion about that?

Thanks

Andreas Röhler



More information about the XEmacs-Beta mailing list