[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scheme-mode+auto-fill-mode minor bug
From: |
Stefan Monnier |
Subject: |
Re: scheme-mode+auto-fill-mode minor bug |
Date: |
Fri, 09 May 2003 16:15:38 -0400 |
This is due to Dave's change:
revision 1.57
date: 2003/02/13 15:54:19; author: fx; state: Exp; lines: +4 -0
(comment-indent): Ensure space before added comment.
----------------------------
I've just installed the patch below which should fix it.
Dave can you confirm that it still does what you wanted it to ?
Stefan
PS: I'm less and less happy with the `whitespace' syntax-class because
it's really not clear what it's supposed to stand for. The absence of
\n from that class in language where \n is a comment-ender is
a common problem, and the presence of things like ' in that class
(in Scheme mode until recently) or ~ (in TeX mode) bothers me.
I think we need to clarify what we mean by `whitespace'.
2003-05-09 Stefan Monnier <address@hidden>
* newcomment.el (comment-indent): Be more careful when inserting
the space, and insert it before setting `begpos'.
--- newcomment.el.~1.63.~ Tue May 6 10:47:40 2003
+++ newcomment.el Fri May 9 16:06:59 2003
@@ -481,11 +481,11 @@
;; Some comment-indent-function insist on not moving comments that
;; are in column 0, so we first go to the likely target column.
(indent-to comment-column)
- (setq begpos (point))
;; Ensure there's a space before the comment for things
;; like sh where it matters (as well as being neater).
- (unless (eq ?\ (char-syntax (char-before)))
+ (unless (memq (char-before) '(nil ?\n ?\t ?\ ))
(insert ?\ ))
+ (setq begpos (point))
(insert starter)
(setq cpos (point-marker))
(insert ender)))