From 42ea7d35b7e214dc5e026be468a40c29d30ba14c Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 18 Jun 2010 09:10:44 +0200 Subject: [PATCH] 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b00a0d5c6..e25194c91 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -4571,10 +4571,8 @@ The following commands are available: 'org-block-todo-from-checkboxes)) ;; Comment characters - ;; (org-set-local 'comment-start "#") + (org-set-local 'comment-start "#") (org-set-local 'comment-padding " ") - (modify-syntax-entry ?# "<") - ;; (modify-syntax-entry ?\n ">") ;; Align options lines (org-set-local -- 2.11.4.GIT