[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 92c090d 30/80: Fix treatment of c
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 92c090d 30/80: Fix treatment of class and package options |
Date: |
Wed, 16 Oct 2019 11:07:11 -0400 (EDT) |
branch: externals/auctex
commit 92c090dae23076ccbbbb4f017ad6fedde79a21fa
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
Fix treatment of class and package options
* preview.el.in (preview-auctex-font-size): Consult
`LaTeX-provided-{class,package}-options' instead of
`(TeX-style-list)'. This function has been accidentally disabled
since AUCTeX began not to include the class and package options into
the styles. Similar problem with bug#25563.
* latex.el (LaTeX-match-class-option): Update doc string because the
above change depends on its implicit behavior.
---
latex.el | 3 ++-
preview.el.in | 15 ++++++++++-----
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/latex.el b/latex.el
index f5f186d..064199d 100644
--- a/latex.el
+++ b/latex.el
@@ -1701,7 +1701,8 @@ The value is actually the tail of the list of options
given to CLASS."
(member option (cdr (assoc class LaTeX-provided-class-options))))
(defun LaTeX-match-class-option (regexp)
- "Check if a documentclass option matching REGEXP is active."
+ "Check if a documentclass option matching REGEXP is active.
+Return first found class option matching REGEXP, or nil if not found."
(TeX-member regexp (apply #'append
(mapcar #'cdr LaTeX-provided-class-options))
'string-match))
diff --git a/preview.el.in b/preview.el.in
index 3134232..30bf45b 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -1363,11 +1363,16 @@ This is for matching screen font size and previews."
If packages, classes or styles were called with an option
like 10pt, size is taken from the first such option if you
had let your document be parsed by AucTeX."
- (catch 'return (dolist (option (TeX-style-list))
- (if (string-match "\`\([0-9]+\)pt\'" option)
- (throw 'return
- (string-to-number
- (match-string 1 option)))))))
+ (let* ((regexp "\`\([0-9]+\)pt\'")
+ (option
+ (or
+ (LaTeX-match-class-option regexp)
+ ;; We don't have `LaTeX-match-package-option'.
+ (TeX-member regexp
+ (apply #'append
+ (mapcar #'cdr LaTeX-provided-package-options))
+ #'string-match))))
+ (if option (string-to-number (match-string 1 option)))))
(defsubst preview-document-pt ()
"Calculate the default font size of document."
- [AUCTeX-diffs] [elpa] externals/auctex 8530cd0 45/80: Support cleveref labels, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 8530cd0 45/80: Support cleveref labels, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 4611580 32/80: * tex-jp.el (AUCTeX-jp): Add keyword :link to info node., Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex a9eb155 37/80: Fix regression, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 4776fd0 25/80: ; Remove compatibility code for older emacsen, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 400b002 28/80: Remove obsolete codes, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex a8bbd1f 31/80: ; Fix document, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex ff688b9 33/80: Stop depreciated usage of undeclared dynamic variable, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 945ffaf 40/80: Update style/babel.el to package version 3.31, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 1b88eda 38/80: Fix autoload generation code (bug#35758), Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex b141ded 27/80: Remove compatibility code for xemacs, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 92c090d 30/80: Fix treatment of class and package options,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 36d06e2 44/80: ; * tests/latex/preview-latex-test.el: Fix typo., Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 686366e 48/80: ; Add Emacs 24 compatibility to the previous commit, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex cdb98c6 34/80: Fix last commit, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 0a9407c 47/80: Conform to `delete-selection-mode' (bug#36385), Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 90fcbd4 41/80: Make navigation function robust, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex f127145 60/80: * context.el (ConTeXt-environment): Fix docstring., Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 0fd9848 35/80: Improve style/mflogo.el, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 5208d91 50/80: Enhance support for file names with spaces, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex c92251c 36/80: Load hyperref.el in `LaTeX-beamer-class-options', Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 0cc2578 39/80: ; Use the correct variable `LaTeX-fontspec-font-features', Tassilo Horn, 2019/10/16