Browse Source

LaTeX export. Fix footnote bug.

Carsten Dominik 15 years ago
parent
commit
c0d77694d2
3 changed files with 11 additions and 3 deletions
  1. 7 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-footnote.el
  3. 3 2
      lisp/org.el

+ 7 - 0
lisp/ChangeLog

@@ -1,3 +1,10 @@
+2009-11-29  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-footnote.el (org-footnote-normalize): Protect replacement
+	text.
+
+	* org.el (org-inside-latex-macro-p): Save match data.
+
 2009-11-27  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-latex.el (org-export-latex-class-options): New variable.

+ 1 - 1
lisp/org-footnote.el

@@ -398,7 +398,7 @@ referenced sequence."
 		   (skip-chars-backward " \t\n\t")
 		   (delete-region (1+ (point)) (match-beginning 0))))))
 	   (unless sort-only
-	     (replace-match (concat before "[" marker "]"))
+	     (replace-match (concat before "[" marker "]") t t)
 	     (and idef
 		  org-footnote-fill-after-inline-note-extraction
 		  (fill-paragraph)))

+ 3 - 2
lisp/org.el

@@ -14485,8 +14485,9 @@ looks only before point, not after."
 
 (defun org-inside-latex-macro-p ()
   "Is point inside a LaTeX macro or its arguments?"
-  (org-in-regexp
-   "\\\\[a-zA-Z]+\\*?\\(\\[[^][\n{}]*\\]\\)?\\({[^{}\n]*}\\)?"))
+  (save-match-data
+    (org-in-regexp
+     "\\\\[a-zA-Z]+\\*?\\(\\[[^][\n{}]*\\]\\)?\\({[^{}\n]*}\\)?")))
 
 (defun org-try-cdlatex-tab ()
   "Check if it makes sense to execute `cdlatex-tab', and do it if yes.