Forráskód Böngészése

Improve the paragraph-start regexp to work better with LaTeX commands.

Carsten Dominik 16 éve
szülő
commit
31e35da863
2 módosított fájl, 15 hozzáadás és 2 törlés
  1. 5 0
      lisp/ChangeLog
  2. 10 2
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-07-01  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-set-autofill-regexps): Improve the paragraph-start
+	regexp to work better with LaTeX commands.
+
 2009-06-30  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-feed.el (org-feed-update): fix problem with non-existing

+ 10 - 2
lisp/org.el

@@ -15805,8 +15805,16 @@ which make use of the date at the cursor."
   (org-set-local 'comment-start-skip "^#+[ \t]*")
   (org-set-local 'paragraph-separate "\f\\|\\*+ \\|[ 	]*$\\|[ \t]*[:|]")
   ;; The paragraph starter includes hand-formatted lists.
-  (org-set-local 'paragraph-start
-		 "\f\\|[ 	]*$\\|\\*+ \\|\f\\|[ \t]*\\([-+*][ \t]+\\|[0-9]+[.)][ \t]+\\)\\|[ \t]*[:|]")
+  (org-set-local 
+   'paragraph-start
+   (concat
+    "\f" "\\|"
+    "[ 	]*$" "\\|"
+    "\\*+ " "\\|"
+    "[ \t]*\\([-+*][ \t]+\\|[0-9]+[.)][ \t]+\\)" "\\|"
+    "[ \t]*[:|]" "\\|"
+    "\\$\\$" "\\|"
+    "\\\\\\(begin\\|end\\|[][]\\)"))
   ;; Inhibit auto-fill for headers, tables and fixed-width lines.
   ;; But only if the user has not turned off tables or fixed-width regions
   (org-set-local