Browse Source

Fix bug due to new entity constant structure

* lisp/org.el (org-compute-latex-and-specials-regexp): Deal with
string elements by discarding them.
Carsten Dominik 15 years ago
parent
commit
025a96d46f
1 changed files with 11 additions and 7 deletions
  1. 11 7
      lisp/org.el

+ 11 - 7
lisp/org.el

@@ -5189,13 +5189,17 @@ will be prompted for."
 	  (if org-export-with-TeX-macros
 	      (list (concat "\\\\"
 			    (regexp-opt
-			     (append (mapcar 'car (append org-entities-user
-							  org-entities))
-				     (if (boundp 'org-latex-entities)
-					 (mapcar (lambda (x)
-						   (or (car-safe x) x))
-						 org-latex-entities)
-				       nil))
+			     (append
+
+			      (delq nil
+				    (mapcar 'car-safe
+					    (append org-entities-user
+						    org-entities)))
+			      (if (boundp 'org-latex-entities)
+				  (mapcar (lambda (x)
+					    (or (car-safe x) x))
+					  org-latex-entities)
+				nil))
 			     'words))) ; FIXME
 	    ))
     ;;			(list "\\\\\\(?:[a-zA-Z]+\\)")))