Hi all,

Please see the attached patch that saves the value of
`TeX-command-extra-options' to the auto-save file so it gets set
project-wide.

Feedback welcome.

Thanks,
-- 
Matt
>From 9cd186203bcc4254701c2323064231a614716736 Mon Sep 17 00:00:00 2001
From: Matthew Leach <matt...@mattleach.net>
Date: Wed, 13 Apr 2016 19:02:46 +0100
Subject: [PATCH] Auto save `TeX-command-extra-options'.

* tex.el (TeX-auto-store): Save the value of `TeX-command-extra-options'
  so it is set project-wide.
---
 tex.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tex.el b/tex.el
index fb734f4..026824d 100644
--- a/tex.el
+++ b/tex.el
@@ -3953,6 +3953,7 @@ If TEX is a directory, generate style files for all files in the directory."
 			    LaTeX-provided-class-options))
 	    (pkg-opts (if (boundp 'LaTeX-provided-package-options)
 			  LaTeX-provided-package-options))
+	    (tex-cmd-opts TeX-command-extra-options)
 	    (verb-envs (when (boundp 'LaTeX-verbatim-environments-local)
 			 LaTeX-verbatim-environments-local))
 	    (verb-macros-delims (when (boundp 'LaTeX-verbatim-macros-with-delims-local)
@@ -3965,6 +3966,9 @@ If TEX is a directory, generate style files for all files in the directory."
 	  (erase-buffer)
 	  (insert "(TeX-add-style-hook\n \""
 		  style "\"\n (lambda ()")
+	  (unless (string= tex-cmd-opts "")
+	    (insert "\n   (setq TeX-command-extra-options\n"
+		    "         " (prin1-to-string tex-cmd-opts) ")"))
 	  (when class-opts
 	    (insert "\n   (TeX-add-to-alist 'LaTeX-provided-class-options\n"
 		    "                     '" (prin1-to-string class-opts) ")"))
-- 
2.8.0

_______________________________________________
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to