[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 92c090d 30/80: Fix treatment of class and packag
From: |
Tassilo Horn |
Subject: |
[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."
- [elpa] externals/auctex cd39966 14/80: ; Fix typos, (continued)
- [elpa] externals/auctex cd39966 14/80: ; Fix typos, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 686a8ed 13/80: Elaborate LaTeX math insertion command, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 8a36595 12/80: Fix handling of function entries in `TeX-complete-list', Tassilo Horn, 2019/10/16
- [elpa] externals/auctex fcaef6b 11/80: Improve fontification of \href macro, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 23b3405 23/80: ; Fix typos, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 3b3c224 26/80: Remove compatibility code for xemacs, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 2a642a4 19/80: Add support for ChangeLog entries for LaTeX files, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex a8bbd1f 31/80: ; Fix document, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex ab57cb0 21/80: Add new function `LaTeX-extract-key-value-label', Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 4776fd0 25/80: ; Remove compatibility code for older emacsen, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 92c090d 30/80: Fix treatment of class and package options,
Tassilo Horn <=
- [elpa] externals/auctex a30db7c 24/80: Allow the user to customize which TeX commands are available in each mode., Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 4d0cf0f 10/80: ; Silence the compiler, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 7872796 15/80: * tex-info.el (TeX-texinfo-mode): Set `add-log-current-defun-function' locally., Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 18a09f0 03/80: * auctex.el: Add requireds, keywords, and trailer, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex b141ded 27/80: Remove compatibility code for xemacs, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 4611580 32/80: * tex-jp.el (AUCTeX-jp): Add keyword :link to info node., Tassilo Horn, 2019/10/16
- [elpa] externals/auctex ca0437d 16/80: Update keywords to biblatex v3.12, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 1b6e513 22/80: ; Use `LaTeX-extract-key-value-label', Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 5592f7d 17/80: Reset `TeX-PDF-from-DVI' if xetex engine is in use, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex a9eb155 37/80: Fix regression, Tassilo Horn, 2019/10/16