branch: externals/auctex
commit 3ef28a55e3671b078c2042d0620c45c973216684
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Add an extra check for tex-buf.el in some style hooks
* style/arabxetex.el ("arabxetex"):
* style/bidi.el ("bidi"):
* style/fontspec.el ("fontspec"):
* style/polyglossia.el ("polyglossia"): Check if "tex-buf.el" is
loaded and require it otherwise. `TeX-check-engine-add-engines'
is defined in "tex-buf.el" and the hook would exit too early if
the library isn't loaded.
---
style/arabxetex.el | 2 ++
style/bidi.el | 4 +++-
style/fontspec.el | 4 +++-
style/polyglossia.el | 2 ++
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/style/arabxetex.el b/style/arabxetex.el
index fefd63e..2dd9fc2 100644
--- a/style/arabxetex.el
+++ b/style/arabxetex.el
@@ -44,6 +44,8 @@
(TeX-run-style-hooks "amsmath" "fontspec" "bidi")
;; We need xelatex, so check for the engine here:
+ (unless (featurep 'tex-buf)
+ (require 'tex-buf))
(TeX-check-engine-add-engines 'xetex)
;; New macros & environments:
diff --git a/style/bidi.el b/style/bidi.el
index c000535..0638482 100644
--- a/style/bidi.el
+++ b/style/bidi.el
@@ -1,6 +1,6 @@
;;; bidi.el --- AUCTeX style for the (XeLaTeX) bidi package
-;; Copyright (C) 2016--2018 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2020 Free Software Foundation, Inc.
;; Author: Uwe Brauer <[email protected]>
;; Created: 2016-03-06
@@ -50,6 +50,8 @@
"bidi"
(lambda ()
;; bidi.sty requires xelatex, so set the engine
+ (unless (featurep 'tex-buf)
+ (require 'tex-buf))
(TeX-check-engine-add-engines 'xetex)
;; 1.4 Turning TeX--XeT features on and off
diff --git a/style/fontspec.el b/style/fontspec.el
index 0688e98..44bc167 100644
--- a/style/fontspec.el
+++ b/style/fontspec.el
@@ -1,6 +1,6 @@
;;; fontspec.el --- AUCTeX style for `fontspec.sty' version 2.6a.
-;; Copyright (C) 2013, 2017, 2018 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2017, 2018, 2020 Free Software Foundation, Inc.
;; Maintainer: [email protected]
;; Author: Mosè Giordano <[email protected]>
@@ -253,6 +253,8 @@ to retrieve the list of fonts."
(TeX-add-style-hook
"fontspec"
(lambda ()
+ (unless (featurep 'tex-buf)
+ (require 'tex-buf))
(TeX-check-engine-add-engines 'luatex 'xetex)
(TeX-run-style-hooks "expl3" "xparse")
diff --git a/style/polyglossia.el b/style/polyglossia.el
index c9366d0..b9aa3d4 100644
--- a/style/polyglossia.el
+++ b/style/polyglossia.el
@@ -231,6 +231,8 @@ argument, otherwise as a mandatory one."
(TeX-add-style-hook
"polyglossia"
(lambda ()
+ (unless (featurep 'tex-buf)
+ (require 'tex-buf))
(TeX-check-engine-add-engines 'luatex 'xetex)
(TeX-auto-add-regexp
`(,LaTeX-polyglossia-lang-regexp (3 1 2) LaTeX-auto-polyglossia-lang))