浏览代码

Fix typo

* lisp/org.el (org-do-latex-and-related): Fix typo.
Nicolas Goaziou 6 年之前
父节点
当前提交
6656f11596
共有 1 个文件被更改,包括 24 次插入23 次删除
  1. 24 23
      lisp/org.el

+ 24 - 23
lisp/org.el

@@ -6265,29 +6265,30 @@ done, nil otherwise."
 			 (save-excursion
 			   (goto-char (1+ (match-beginning 0)))
 			   (face-at-point nil t)))
-	  (let ((start (if (memq (char-after (1+ (match-beginning 0)))
-				 '(?_ ?^))
-			   (1+ (match-beginning 0))
-			 (match-beginning 0)))
-		(end
-		 (let* ((b (match-beginning 0))
-			(e (match-end 0))
-			(m (buffer-substring-no-properties b e)))
-		   (cond
-		    ((string-match "\\`[ \t]*\\\\begin{\\([a-zA-Z0-9\\*]+\\)}" m)
-		     (let ((re (format "\\\\end{%s}[ \t]*$"
-				       (regexp-quote (match-string 1 m)))))
-		       (or (re-search-forward re nil t) e)))
-		    ((string-match "\\\\end{\\([a-zA-Z0-9\\*]+\\)}[ \t]*\\'" m)
-		     (let ((re (format "^[ \t]*\\\\begin{%s}"
-				       (regexp-quote (match-string 1 m)))))
-		       (setq start
-			     (or (save-excursion (re-search-backward re nil t))
-				 b))
-		       (line-end-position)))
-		    ((string-match "\\`\\\\[a-zA-Z]+\\*?{\\'" m)
-		     (search-forward "}" nil t))
-		    (t e)))))
+	  (let* ((start (if (memq (char-after (1+ (match-beginning 0)))
+				  '(?_ ?^))
+			    (1+ (match-beginning 0))
+			  (match-beginning 0)))
+		 (end
+		  (let* ((b (match-beginning 0))
+			 (e (match-end 0))
+			 (m (buffer-substring-no-properties b e)))
+		    (cond
+		     ((string-match "\\`[ \t]*\\\\begin{\\([a-zA-Z0-9\\*]+\\)}"
+				    m)
+		      (let ((re (format "\\\\end{%s}[ \t]*$"
+					(regexp-quote (match-string 1 m)))))
+			(or (re-search-forward re nil t) e)))
+		     ((string-match "\\\\end{\\([a-zA-Z0-9\\*]+\\)}[ \t]*\\'" m)
+		      (let ((re (format "^[ \t]*\\\\begin{%s}"
+					(regexp-quote (match-string 1 m)))))
+			(setq start
+			      (or (save-excursion (re-search-backward re nil t))
+				  b))
+			(line-end-position)))
+		     ((string-match "\\`\\\\[a-zA-Z]+\\*?{\\'" m)
+		      (search-forward "}" nil t))
+		     (t e)))))
 	    (font-lock-prepend-text-property
 	     start end 'face 'org-latex-and-related)
 	    (add-text-properties start end '(font-lock-multiline t)))