[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 45d9e1bed337589648d4d

From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 45d9e1bed337589648d4de261d3d9cd68a1b2552
Date: Tue, 19 Dec 2017 11:27:20 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  45d9e1bed337589648d4de261d3d9cd68a1b2552 (commit)
      from  2d35adf63fdb464ee0ef3bc98723ba5e5d1cfa20 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 45d9e1bed337589648d4de261d3d9cd68a1b2552
Author: Ikumi Keita <address@hidden>
Date:   Wed Dec 20 01:26:18 2017 +0900

    Make sure `LaTeX-default-options' is honored
    * latex.el (TeX-arg-document): Use `LaTeX-default-options' as default
    of class options even when the respective `LaTeX-XXXX-class-options'
    is not set.

diff --git a/latex.el b/latex.el
index 4dcb4bf..c2d8a4c 100644
--- a/latex.el
+++ b/latex.el
@@ -2232,7 +2232,7 @@ To insert a hook here, you must insert it in the 
appropiate style file.")
 OPTIONAL and IGNORE are ignored."
   (let* ((TeX-file-extensions '("cls"))
         (crm-separator ",")
-        style var options)
+        style var options defopt optprmpt)
     (unless LaTeX-global-class-files
       (setq LaTeX-global-class-files
            (if (if (eq TeX-arg-input-file-search 'ask)
@@ -2250,6 +2250,12 @@ OPTIONAL and IGNORE are ignored."
     (setq TeX-after-document-hook nil)
     (TeX-run-style-hooks style)
     (setq var (intern (format "LaTeX-%s-class-options" style)))
+    (setq defopt (if (stringp LaTeX-default-options)
+                    LaTeX-default-options
+                  (mapconcat #'identity LaTeX-default-options ",")))
+    (setq optprmpt
+         (if (and defopt (not (string-equal defopt "")))
+             (format "Options (default %s): " defopt) "Options: "))
     (if (or (and (boundp var)
                 (listp (symbol-value var)))
            (fboundp var))
@@ -2259,12 +2265,10 @@ OPTIONAL and IGNORE are ignored."
            (setq options
                  (mapconcat 'identity
-                             "Options: " (mapcar 'list (symbol-value var)) nil 
-                             (if (stringp LaTeX-default-options)
-                                 LaTeX-default-options
-                               (mapconcat 'identity LaTeX-default-options 
+                             optprmpt (mapcar 'list (symbol-value var)) nil nil
+                             nil nil defopt)
-      (setq options (TeX-read-string "Options: ")))
+      (setq options (TeX-read-string optprmpt nil nil defopt)))
     (unless (zerop (length options))
       (insert LaTeX-optop options LaTeX-optcl)
       (let ((opts (LaTeX-listify-package-options options)))


Summary of changes:
 latex.el | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]