[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. c0f3659059a138aaf5fa6
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. c0f3659059a138aaf5fa610f2913035d63225bfb |
Date: |
Thu, 2 Feb 2017 06:33:24 +0000 (UTC) |
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 c0f3659059a138aaf5fa610f2913035d63225bfb (commit)
from 6c91dba2f71b9d5aaa7fb4234c62679c4e357617 (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 c0f3659059a138aaf5fa610f2913035d63225bfb
Author: Tassilo Horn <address@hidden>
Date: Thu Feb 2 07:28:48 2017 +0100
Fix TeX-view-predicate-list-builtin predicates wrt class opts
* latex.el (LaTeX-match-class-option): New function.
* tex.el (TeX-view-predicate-list-builtin): Use above function to check
paper sizes orientation from documentclass options (bug#25563).
diff --git a/latex.el b/latex.el
index e8c3b04..bd64f7f 100644
--- a/latex.el
+++ b/latex.el
@@ -1703,6 +1703,12 @@ See also `LaTeX-provided-package-options'.")
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."
+ (TeX-member regexp (apply #'append
+ (mapcar #'cdr LaTeX-provided-class-options))
+ 'string-match))
+
(defvar LaTeX-provided-package-options nil
"Alist of options provided to LaTeX packages.
For each element, the CAR is the name of the package, the CDR is
diff --git a/tex.el b/tex.el
index 73d4927..590568c 100644
--- a/tex.el
+++ b/tex.el
@@ -1167,21 +1167,33 @@ all the regular expressions must match for the element
to apply."
(mode-io-correlate
TeX-source-correlate-mode)
(paper-landscape
- (TeX-match-style "\\`landscape\\'"))
+ (and (fboundp 'LaTeX-provided-class-options)
+ (LaTeX-match-class-option "\\`landscape\\'")))
(paper-portrait
- (not (TeX-match-style "\\`landscape\\'")))
+ (not (and (fboundp 'LaTeX-provided-class-options)
+ (LaTeX-match-class-option "\\`landscape\\'"))))
(paper-a4
- (TeX-match-style "\\`a4paper\\|a4dutch\\|a4wide\\|sem-a4\\'"))
+ (let ((regex "\\`a4paper\\|a4dutch\\|a4wide\\|sem-a4\\'"))
+ (or (TeX-match-style regex)
+ (and (fboundp 'LaTeX-match-class-option)
+ (LaTeX-match-class-option regex)))))
(paper-a5
- (TeX-match-style "\\`a5paper\\|a5comb\\'"))
+ (let ((regex "\\`a5paper\\|a5comb\\'"))
+ (or (TeX-match-style regex)
+ (and (fboundp 'LaTeX-match-class-option)
+ (LaTeX-match-class-option regex)))))
(paper-b5
- (TeX-match-style "\\`b5paper\\'"))
+ (and (fboundp 'LaTeX-match-class-option)
+ (LaTeX-match-class-option "\\`b5paper\\'")))
(paper-letter
- (TeX-match-style "\\`letterpaper\\'"))
+ (and (fboundp 'LaTeX-match-class-option)
+ (LaTeX-match-class-option "\\`letterpaper\\'")))
(paper-legal
- (TeX-match-style "\\`legalpaper\\'"))
+ (and (fboundp 'LaTeX-match-class-option)
+ (LaTeX-match-class-option "\\`legalpaper\\'")))
(paper-executive
- (TeX-match-style "\\`executivepaper\\'")))
+ (and (fboundp 'LaTeX-match-class-option)
+ (LaTeX-match-class-option "\\`executivepaper\\'"))))
"Alist of built-in predicates for viewer selection and invocation.
See the doc string of `TeX-view-predicate-list' for a short
description of each predicate.")
-----------------------------------------------------------------------
Summary of changes:
latex.el | 6 ++++++
tex.el | 28 ++++++++++++++++++++--------
2 files changed, 26 insertions(+), 8 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. c0f3659059a138aaf5fa610f2913035d63225bfb,
Tassilo Horn <=