Przeglądaj źródła

org.el (org-mode): Set `paragraph-start'

* org.el (org-mode): Set `paragraph-start'.

The value inherited from outline-mode is wrong because
outline mode does not enforce the space after the star
while Org-mode does.

outline-mode value for `paragraph-start' prevents filling
paragraphs containing a string like " -- *bold*": in this
case, fill-paragraph might think that the "*b" part of the
string starts a paragraph while it does not.

Thanks to Samuel Wales for reporting this.
Bastien Guerry 12 lat temu
rodzic
commit
7afbf870f2
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      lisp/org.el

+ 2 - 0
lisp/org.el

@@ -4898,6 +4898,8 @@ The following commands are available:
   (org-set-local 'outline-regexp org-outline-regexp)
   (org-set-local 'outline-level 'org-outline-level)
   (setq bidi-paragraph-direction 'left-to-right)
+  ;; FIXME Circumvent a bug in outline.el (Emacs <24.4)
+  (set (make-local-variable 'paragraph-start) "\\|[ \t]*$\\|\\*+ ")
   (when (and org-ellipsis
              (fboundp 'set-display-table-slot) (boundp 'buffer-display-table)
 	     (fboundp 'make-glyph-code))