瀏覽代碼

org-latex.el: Fix TeX-master declaration.

* org-latex.el (org-export-as-latex): Fix TeX-master declaration.

TINYCHANGE
Bastien Guerry 13 年之前
父節點
當前提交
c8f9972a41
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lisp/org-latex.el

+ 3 - 1
lisp/org-latex.el

@@ -885,7 +885,6 @@ when PUB-DIR is set, use this as the publishing directory."
 		   (concat filename ".tex")
 		 filename)))
 	 (auto-insert nil); Avoid any auto-insert stuff for the new file
-	 (TeX-master t) ; Avoid the Query for TeX master from AUCTeX
 	 (buffer (if to-buffer
 		     (cond
 		      ((eq to-buffer 'string) (get-buffer-create
@@ -958,6 +957,9 @@ when PUB-DIR is set, use this as the publishing directory."
 	   :exclude-tags (plist-get opt-plist :exclude-tags)
 	   :LaTeX-fragments nil)))
 
+    ;; Avoid the Query for TeX master from AUCTeX
+    (if (boundp 'TeX-master) (setq TeX-master t))
+
     (set-buffer buffer)
     (erase-buffer)
     (org-install-letbind)