No longer define comments in the syntax table
commit42ea7d35b7e214dc5e026be468a40c29d30ba14c
authorCarsten Dominik <carsten.dominik@gmail.com>
Fri, 18 Jun 2010 07:10:44 +0000 (18 09:10 +0200)
committerCarsten Dominik <carsten.dominik@gmail.com>
Fri, 18 Jun 2010 07:10:44 +0000 (18 09:10 +0200)
tree1c4257cc0f562e72a09cf9b9fec1a0b02e553f3f
parentc201da51b88703a71e6eda64b52d53a5441c594f
No longer define comments in the syntax table

* lisp/org.el (org-mode): Set `comment-start' instead of changing the
syntax of the `#' character.

Leo writes:

> Setting a comment starter without a corresponding comment ender is
> problematic and the # creeps in mysteriously under auto-fill. For
> example, in my current running emacs, this happens almost certainly in
> all org files that has # in their header. The only (temporary) solution
> seems to reboot emacs (which is painful and disruptive).
>
> If you try eval (forward-comment 1) at the beginning of an org file that
> has some "#+..." it will move to the end of file (the whole file is
> regarded as one single comment). So when auto-fill a long text, it will
> find the common prefix to be #.
>
> In addition, I don't think org mode has clear comment syntax or ideas on
> what to do with it.
>
> I can't see any gain from (modify-syntax-entry ?# "<") so I am proposing
> removing it entirely and get rid of this mysterious and annoying bug
> once and for all.
>
> The attached patch may (though I think it is quite safe) cause some bugs
> but those will be fixable unlike the one mentioned above.
>
> Best wishes,
>
> Leo
lisp/org.el