Prechádzať zdrojové kódy

Search for LaTeX setup case-insensitively

* lisp/org-latex.el (org-export-latex-set-initial-vars): Bind
`case-fold-search' to t around the search for special LaTeX setup.
* lisp/org-beamer.el (org-beamer-after-initial-vars):  Bind
`case-fold-search' to t around the search for special BEAMER setup.
Carsten Dominik 14 rokov pred
rodič
commit
034dbac3ee
2 zmenil súbory, kde vykonal 12 pridanie a 6 odobranie
  1. 5 3
      lisp/org-beamer.el
  2. 7 3
      lisp/org-latex.el

+ 5 - 3
lisp/org-beamer.el

@@ -438,8 +438,10 @@ The effect is that these values will be accessible during export."
 		(save-restriction
 		  (widen)
 		  (goto-char (point-min))
-		  (and (re-search-forward
-			"^#\\+BEAMER_FRAME_LEVEL:[ \t]*\\(.*?\\)[ \t]*$" nil t)
+		  (and (let ((case-fold-search t))
+			 (re-search-forward
+			  "^#\\+BEAMER_FRAME_LEVEL:[ \t]*\\(.*?\\)[ \t]*$"
+			  nil t))
 		       (match-string 1))))
 	      (plist-get org-export-latex-options-plist :beamer-frame-level)
 	      org-beamer-frame-level))
@@ -461,7 +463,7 @@ The effect is that these values will be accessible during export."
 	      (save-excursion
 		(save-restriction
 		  (widen)
-		  (let ((txt ""))
+		  (let ((txt "") (case-fold-search t))
 		    (goto-char (point-min))
 		    (while (re-search-forward
 			    "^#\\+BEAMER_HEADER_EXTRA:[ \t]*\\(.*?\\)[ \t]*$"

+ 7 - 3
lisp/org-latex.el

@@ -1124,7 +1124,9 @@ LEVEL indicates the default depth for export."
 	      (save-restriction
 		(widen)
 		(goto-char (point-min))
-		(and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\(-[a-zA-Z]+\\)" nil t)
+		(and (let ((case-fold-search t))
+		       (re-search-forward
+			"^#\\+LaTeX_CLASS:[ \t]*\\(-[a-zA-Z]+\\)" nil t))
 		     (match-string 1))))
 	    (plist-get org-export-latex-options-plist :latex-class)
 	    org-export-latex-default-class)
@@ -1138,8 +1140,10 @@ LEVEL indicates the default depth for export."
 	      (save-restriction
 		(widen)
 		(goto-char (point-min))
-		(and (re-search-forward "^#\\+LaTeX_CLASS_OPTIONS:[ \t]*\\(.*?\\)[ \t]*$" nil t)
-		     (match-string 1))))
+		(and (let ((case-fold-search t))
+		       (re-search-forward
+			"^#\\+LaTeX_CLASS_OPTIONS:[ \t]*\\(.*?\\)[ \t]*$" nil t)
+		       (match-string 1)))))
 	    (plist-get org-export-latex-options-plist :latex-class-options))
 	org-export-latex-class
 	(or (car (assoc org-export-latex-class org-export-latex-classes))