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
This commit is contained in:
parent
c201da51b8
commit
42ea7d35b7
|
@ -4571,10 +4571,8 @@ The following commands are available:
|
||||||
'org-block-todo-from-checkboxes))
|
'org-block-todo-from-checkboxes))
|
||||||
|
|
||||||
;; Comment characters
|
;; Comment characters
|
||||||
;; (org-set-local 'comment-start "#")
|
(org-set-local 'comment-start "#")
|
||||||
(org-set-local 'comment-padding " ")
|
(org-set-local 'comment-padding " ")
|
||||||
(modify-syntax-entry ?# "<")
|
|
||||||
;; (modify-syntax-entry ?\n ">")
|
|
||||||
|
|
||||||
;; Align options lines
|
;; Align options lines
|
||||||
(org-set-local
|
(org-set-local
|
||||||
|
|
Loading…
Reference in New Issue