[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex c6d6c19 79/80: Merge remote-track
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex c6d6c19 79/80: Merge remote-tracking branch 'origin/master' into externals/auctex |
Date: |
Wed, 16 Oct 2019 11:07:22 -0400 (EDT) |
branch: externals/auctex
commit c6d6c19b1387dc488693f1a7407299314f485f2e
Merge: 0c8d670 01dc048
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Merge remote-tracking branch 'origin/master' into externals/auctex
---
Makefile.in | 15 +-
auctex.el.in | 41 ++-
context.el | 2 +-
doc/auctex.texi | 6 +-
doc/changes.texi | 28 +-
doc/install.texi | 4 +-
doc/preview-problems.texi | 56 ++++
font-latex.el | 130 ++++++++--
latex.el | 124 ++++++++-
multi-prompt.el | 8 +-
preview.el | 194 ++++++++++----
prv-emacs.el | 9 +-
style/AnonymousPro.el | 10 +-
style/babel.el | 286 ++++++++++++++++++---
style/beamer.el | 1 +
.../path-expansion.el => style/beamerarticle.el | 24 +-
.../tex/path-expansion.el => style/beamerswitch.el | 24 +-
style/bicaption.el | 9 +-
style/breqn.el | 14 +-
style/caption.el | 11 +-
style/changelog.el | 159 ++++++++++++
style/cleveref.el | 141 ++++++++--
style/color.el | 6 +-
style/expl3.el | 7 +-
style/fancyvrb.el | 10 +-
style/floatrow.el | 20 +-
style/fontspec.el | 2 +-
style/fvextra.el | 74 +++++-
style/hyperref.el | 12 +-
style/listings.el | 23 +-
style/ltugboat.el | 283 ++++++++++++++++++++
style/mflogo.el | 15 +-
style/{mflogo.el => multitoc.el} | 38 ++-
style/paracol.el | 27 +-
style/pst-plot.el | 6 +-
style/ragged2e.el | 15 +-
style/subcaption.el | 19 +-
style/tcolorbox.el | 21 +-
style/thmtools.el | 35 ++-
style/titlesec.el | 18 +-
style/varioref.el | 141 +++++-----
style/xcolor.el | 9 +-
style/xparse.el | 10 +-
tests/latex/preview-latex-test.el | 2 +-
tests/tex/navigation.el | 54 ++++
tests/tex/path-expansion.el | 2 +-
tex-buf.el | 62 +++--
tex-info.el | 6 +-
tex-jp.el | 3 +-
tex.el | 126 +++++++--
texmathp.el | 6 +-
51 files changed, 1860 insertions(+), 488 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 3c07c16..bee090e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -52,12 +52,15 @@ PACKAGE=auctex
PACKAGE_INFO=auctex preview-latex
EMACS=@EMACS@
ELCC=$(EMACS) -batch -q -no-site-file -no-init-file -l lpath.el
-AUTOLOAD=--eval '(let ((generated-autoload-file (expand-file-name "$@"))) \
- (mapcar (function update-file-autoloads) command-line-args-left) \
+AUTOLOAD=--eval '(let ((autoload-file (expand-file-name "$@"))) \
+ (mapcar (lambda (file) \
+ (update-file-autoloads file nil autoload-file)) \
+ command-line-args-left) \
(save-buffers-kill-emacs t))'
-PREVIEW_AUTOLOAD=--eval '(let ((generated-autoload-file (expand-file-name
"$@"))) \
- (update-file-autoloads "preview.el")(save-buffers-kill-emacs
t))'
+PREVIEW_AUTOLOAD=--eval '(let ((autoload-file (expand-file-name "$@"))) \
+ (update-file-autoloads "preview.el" nil autoload-file) \
+ (save-buffers-kill-emacs t))'
# Files and directories excluded from distributed tar ball.
EXCLUDEDFILES=autogen.sh .gitignore doc/.gitignore doc/tex-ref.log \
@@ -165,7 +168,9 @@ STYLESRC = style/prosper.el \
style/arabxetex.el style/australian.el style/newzealand.el \
style/xltabular.el style/marginnote.el style/thmtools.el \
style/ocg-p.el style/ocgx.el style/thm-restate.el \
- style/pythontex.el style/dashundergaps.el
+ style/pythontex.el style/dashundergaps.el style/beamerarticle.el \
+ style/changelog.el style/ltugboat.el style/beamerswitch.el \
+ style/multitoc.el
STYLEELC = $(STYLESRC:.el=.elc)
diff --git a/auctex.el.in b/auctex.el.in
index f75b53e..93c9284 100644
--- a/auctex.el.in
+++ b/auctex.el.in
@@ -1,10 +1,45 @@
-;;; auctex.el
-;;
+;;; auctex.el --- Integrated environment for *TeX*
+
+;; Copyright (C) 2014-2019 Free Software Foundation, Inc.
+
+;; URL: https://www.gnu.org/software/auctex/
+;; Maintainer: address@hidden
+;; Notifications-To: address@hidden
+;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
+;; Keywords: TeX LaTeX Texinfo ConTeXt docTeX preview-latex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software: you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
;; This can be used for starting up AUCTeX. The following somewhat
;; strange trick causes tex-site.el to be loaded in a way that can be
;; safely undone using (unload-feature 'tex-site).
-;;
+
+;;; Code:
+
+;; FIXME: I don't quite understand in which way this is better than less
+;; strange code such as
+;; (require 'tex-site (expand-file-name "tex-site.el"
+;; (file-name-directory load-file-name))
+
(autoload 'TeX-load-hack
@lisptexsite@)
(TeX-load-hack)
+;;; auctex.el ends here
diff --git a/context.el b/context.el
index db2f86f..87bcd38 100644
--- a/context.el
+++ b/context.el
@@ -619,7 +619,7 @@ inserted after the sectioning command."
;;; Environments
(defgroup ConTeXt-environment nil
- "Environments in AUCTeX."
+ "Environments in ConTeXt."
:group 'ConTeXt-macro)
;; TODO: interface awareness
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 8843fa9..cb25757 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -459,10 +459,10 @@ and @samp{\(...\)} in @LaTeX{} files by pressing @kbd{$},
add the
following to your init file
@lisp
(add-hook 'plain-TeX-mode-hook
- (lambda () (set (make-variable-buffer-local 'TeX-electric-math)
+ (lambda () (set (make-local-variable 'TeX-electric-math)
(cons "$" "$"))))
(add-hook 'LaTeX-mode-hook
- (lambda () (set (make-variable-buffer-local 'TeX-electric-math)
+ (lambda () (set (make-local-variable 'TeX-electric-math)
(cons "\(" "\)"))))
@end lisp
@@ -2163,7 +2163,7 @@ following stanza into your init file:
(eval-after-load "font-latex"
'(setq-default
font-latex-match-reference-keywords-local
- (remove (TeX-assoc-string "footnote"
+ (remove (assoc-string "footnote"
font-latex-match-reference-keywords-local)
font-latex-match-reference-keywords-local)))
@end lisp
diff --git a/doc/changes.texi b/doc/changes.texi
index 8475ced..41e73da 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -1,5 +1,5 @@
@c This is part of the AUCTeX manual.
-@c Copyright (C) 1994-2002, 2004-2010, 2012-2017 Free Software
+@c Copyright (C) 1994-2002, 2004-2010, 2012-2019 Free Software
@c Foundation, Inc.
@c See file auctex.texi for copying conditions.
@include macros.texi
@@ -12,6 +12,18 @@
@itemize @bullet
@item
+A new method is implemented in @previewlatex{} to adjust the foreground
+colors of generated images to those of Emacs, when the @LaTeX{} command
+produces @acronym{PDF}. The traditional method became invalid because
+of the change introduced in Ghostscript 9.27. Unfortunately, the new
+method doesn't work due to a bug in Ghostscript 9.27 and is valid only
+for Ghostscript > 9.27. There is also a fallback method for gs 9.27
+users which displays plain ``black on white'' images. For successful
+function of @previewlatex{}, the users are encouraged to set up the new
+user option @code{preview-pdf-color-adjust-method} to choose appropriate
+option among the three: new, traditional and fallback method.
+
+@item
@AUCTeX{} has support for the Flymake package in Emacs 26 or newer. To
enable, call @kbd{M-x flymake-mode RET} or add this to your
@file{.emacs} file:
@@ -52,11 +64,25 @@ Texinfo mode. When it is enabled, typing @kbd{@@} will
invoke
other TeX modes of @AUCTeX{}.
@item
+Fontification support for @samp{biblatex} package is improved and
+updated to macros provided by package version 3.12. For qualified
+lists, at least 2 mandatory arguments are fontified.
+
+@item
Support for column specifiers @samp{w} and @samp{W} provided by
@samp{array} package is added to @file{array.el}. The correct counting
of columns only works when the @samp{align} parameter is enclosed in
braces, e.g., @samp{w@{l@}@{3cm@}}. The short version @samp{wl@{3cm@}}
is not supported.
+
+@item
+Entries for @samp{PDF Tools} are added in
+@code{TeX-view-program-list-builtin} for Windows and macOS. This viewer
+can be configured under these operating systems with an entry like this
+in an init file:
+@lisp
+(setq TeX-view-program-selection '((output-pdf "PDF Tools")))
+@end lisp
@end itemize
@heading News in 12.1
diff --git a/doc/install.texi b/doc/install.texi
index 1940d9d..0e88cec 100644
--- a/doc/install.texi
+++ b/doc/install.texi
@@ -94,8 +94,8 @@ support.
@item Windows
Precompiled versions are available from
@uref{https://ftp.gnu.org/gnu/emacs/windows/}.
-@item Mac OS X
-For an overview of precompiled versions of Emacs for Mac OS X see for
+@item macOS
+For an overview of precompiled versions of Emacs for macOS see for
example @uref{https://www.emacswiki.org/emacs/EmacsForMacOS}.
@item GNU/Linux
Most GNU/Linux distributions nowadays provide a recent variant of Emacs
diff --git a/doc/preview-problems.texi b/doc/preview-problems.texi
index 824892c..264e14c 100644
--- a/doc/preview-problems.texi
+++ b/doc/preview-problems.texi
@@ -19,6 +19,7 @@ newer versions of the problematic software or by simple
patches.
* Too small bounding boxes::
* x-symbol interoperation::
* Middle-clicks paste instead of toggling::
+* No images are displayed with gs 9.27 and earlier::
@end menu
If you find something not mentioned here, please send a bug report using
@@ -137,3 +138,58 @@ such a complicated mess that no patch is in sight. Better
just end the
search with @kbd{@key{RET}} before toggling and resume with @kbd{C-s
C-s} or similar afterwards. Since previews over the current match will
auto-open, anyway, this should not be much of a problem in practice.
+
+@node No images are displayed with gs 9.27 and earlier
+@section No images are displayed with gs 9.27 and earlier
+
+@previewlatex{} tries to adjust the foreground and background colors of
+generated images to those of Emacs. Unfortunately, incompatible changes
+introduced in Ghostscript 9.27 breaks the traditional method partially,
+and @previewlatex{} can display no images under certain circumstances.
+
+A new method implemented alternatively works only with Ghostscript >
+9.27. If you are using Ghostscript 9.27 or earlier, customize the
+option @code{preview-pdf-adjust-color-method}.
+
+@defopt preview-pdf-adjust-color-method
+Method to adjust colors of images generated from @acronym{PDF}. It is
+not consulted when the @LaTeX{} command produces @acronym{DVI} files.
+
+When the option is @code{t} (default), @previewlatex{} adjusts the FG
+and BG colors of the generated images by the new method. This method
+requires that Ghostscript has working @code{DELAYBIND} feature, thus is
+invalid with gs 9.27 (and possibly < 9.27).
+
+When it is @code{compatible}, @previewlatex{} uses traditional method.
+This option is provided for backward compatibility with older gs. See
+the below explanation for detail.
+
+When @code{nil}, no adjustment is done and ``black on white'' image is
+generated regardless of Emacs color. This is provided for fallback for
+gs 9.27 users with customized foreground color. See the below
+explanation for detail.
+
+When the @LaTeX{} command produces @acronym{PDF} rather than
+@acronym{DVI} and Emacs has non-trivial foreground color, the
+traditional method (@code{compatible}) makes gs >= 9.27 to stop with
+error. Here, ``non-trivial foreground color'' includes customized
+themes.
+
+If you use such non-trivial foreground color and the version of
+Ghostscript equals to 9.27, you have two options:
+@enumerate
+@item
+Choose the value @code{compatible} and customize
+@code{preview-reference-face} to have default (black) foreground color.
+This makes the generated image almost non-readable on dark background,
+so the next option would be your only choice in that case.
+@item
+Choose the value @code{nil}, which forces plain ``black on white''
+appearance for the generated image. You can at least read what are
+written in the image although they may not match with your Emacs color
+well.
+@end enumerate
+
+The default value used to be @code{compatible} for short period before
+Ghostscript 9.50 was released but now is @code{t}.
+@end defopt
diff --git a/font-latex.el b/font-latex.el
index bd504a8..4df9526 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1,6 +1,6 @@
;;; font-latex.el --- LaTeX fontification for Font Lock mode.
-;; Copyright (C) 1996-2017 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2019 Free Software Foundation, Inc.
;; Authors: Peter S. Galbraith <address@hidden>
;; Simon Marshall <address@hidden>
@@ -263,33 +263,84 @@ variable `font-latex-fontify-sectioning'." ',num)
("newrefsegment" "mancite" "pno" "ppno" "nopp" "psq" "psqq")
font-lock-variable-name-face 2 noarg)
("biblatex"
- (("newrefsection" "[") ("ExecuteBibliographyOptions" "[{")
- ("printbibliography" "[") ("printshorthands" "[") ("printbibheading" "[")
+ (;; 3.2.2 Setting Package Options
+ ("ExecuteBibliographyOptions" "[{")
+ ;; 3.7.1 Resources
("addbibresource" "[{") ("addglobalbib" "[{") ("addsectionbib" "[{")
- ("bibbysection" "[") ("bibbysegment" "[") ("bibbycategory" "[")
- ("DeclareBibliographyCategory" "{") ("addtocategory" "{{")
("defbibenvironment" "{{{{")
- ("defbibheading" "{[{") ("defbibnote" "{{") ("defbibfilter" "{{")
("defbibcheck" "{{")
- ("defbibentryset" "{{") ("Cite" "[[{") ("parencite" "*[[{") ("Parencite"
"[[{")
- ("footcite" "[[{") ("footcitetext" "[[{") ("textcite" "[[{") ("Textcite"
"[[{")
- ("smartcite" "[[{") ("Smartcite" "[[{") ("supercite" "{") ("autocite"
"*[[{")
- ("Autocite" "*[[{") ("citeauthor" "*[[{") ("Citeauthor" "*[[{")
("citetitle" "*[[{")
- ("citeyear" "*[[{") ("citedate" "*[[{") ("citeurl" "[[{") ("parentext"
"{")
- ("brackettext" "{") ("fullcite" "[[{") ("fullfootcite" "[[{") ("volcite"
"[{[[")
- ("Volcite" "[{[[") ("pvolcite" "[{[[") ("Pvolcite" "[{[[") ("fvolcite"
"[{[[")
- ("ftvolcite" "[{[[") ("svolcite" "[{[[") ("Svolcite" "[{[[") ("tvolcite"
"[{[[")
- ("Tvolcite" "[{[[") ("avolcite" "[{[[") ("Avolcite" "[{[[") ("notecite"
"[[{")
- ("Notecite" "[[{") ("pnotecite" "[[{") ("Pnotecite" "[[{") ("fnotecite"
"[[{")
- ("citename" "[[{[{") ("citelist" "[[{[{") ("citefield" "[[{[{")
("citereset" "*")
- ("RN" "{") ("Rn" "{") ("DefineBibliographyStrings" "{{")
("DefineBibliographyExtras" "{{")
+ ;; 3.7.2 The Bibliography
+ ("printbibliography" "[") ("bibbysection" "[") ("bibbysegment" "[")
+ ("bibbycategory" "[") ("printbibheading" "[")
+ ;; 3.7.3 Bibliography Lists
+ ("printbiblist" "[{") ("printshorthands" "[")
+ ;; 3.7.4 Bibliography Sections
+ ("newrefsection" "[")
+ ;; 3.7.6 Bibliography Categories
+ ("DeclareBibliographyCategory" "{") ("addtocategory" "{{")
+ ;; 3.7.7 Bibliography Headings and Environments
+ ("defbibenvironment" "{{{{") ("defbibheading" "{[{")
+ ;; 3.7.8 Bibliography Notes
+ ("defbibnote" "{{")
+ ;; 3.7.9 Bibliography Filters and Checks
+ ("defbibfilter" "{{") ("defbibcheck" "{{")
+ ;; 3.7.10 Reference Contexts
+ ("DeclareRefcontext" "{{") ("newrefcontext" "[{")
+ ("assignrefcontextkeyws" "*[{") ("assignrefcontextcats" "*[{")
+ ("assignrefcontextentries" "*[{")
+ ;; 3.7.11 Dynamic Entry Sets
+ ("defbibentryset" "{{")
+ ;; 3.8.1 Standard Commands
+ ("Cite" "[[{")
+ ("parencite" "*[[{") ("Parencite" "[[{")
+ ("footcite" "[[{") ("footcitetext" "[[{")
+ ;; 3.8.2 Style-specific Commands
+ ("textcite" "[[{") ("Textcite" "[[{")
+ ("smartcite" "[[{") ("Smartcite" "[[{")
+ ("supercite" "{")
+ ;; 3.8.3 Qualified Citation Lists
+ ;; For qualified lists, fontify at least 2 mandatory arguments
+ ("cites" "(([[{[[{") ("Cites" "(([[{[[{")
+ ("parencites" "(([[{[[{") ("Parencites" "(([[{[[{")
+ ("footcites" "(([[{[[{") ("footcitetexts" "(([[{[[{")
+ ("smartcites" "(([[{[[{") ("Smartcites" "(([[{[[{")
+ ("textcites" "(([[{[[{") ("Textcites" "(([[{[[{")
+ ("supercites" "(([[{[[{")
+ ;; 3.8.4 Style-independent Commands
+ ("autocite" "*[[{") ("Autocite" "*[[{")
+ ("autocites" "(([[{[[{") ("Autocites" "(([[{[[{")
+ ;; 3.8.5 Text Commands
+ ("citeauthor" "*[[{") ("Citeauthor" "*[[{") ("citetitle" "*[[{")
+ ("citeyear" "*[[{") ("citedate" "*[[{")
+ ("citeurl" "[[{") ("parentext" "{")
+ ("brackettext" "{")
+ ;; 3.8.6 Special Commands
+ ("fullcite" "[[{") ("footfullcite" "[[{")
+ ("volcite" "[{[{") ("Volcite" "[{[{")
+ ("volcites" "(([{[{[{[{") ("Volcites" "(([{[{[{[{")
+ ("pvolcite" "[{[{") ("Pvolcite" "[{[{")
+ ("pvolcites" "(([{[{[{[{") ("Pvolcites" "(([{[{[{[{")
+ ("fvolcite" "[{[{") ("ftvolcite" "[{[{")
+ ("fvolcites" "(([{[{[{[{") ("Fvolcites" "(([{[{[{[{")
+ ("svolcite" "[{[{") ("Svolcite" "[{[{")
+ ("svolcites" "(([{[{[{[{") ("Svolcites" "(([{[{[{[{")
+ ("tvolcite" "[{[{") ("Tvolcite" "[{[{")
+ ("tvolcites" "(([{[{[{[{") ("Tvolcites" "(([{[{[{[{")
+ ("avolcite" "[{[{") ("Avolcite" "[{[{")
+ ("avolcites" "(([{[{[{[{") ("Avolcites" "(([{[{[{[{")
+ ("notecite" "[[{") ("Notecite" "[[{")
+ ("pnotecite" "[[{") ("Pnotecite" "[[{")
+ ("fnotecite" "[[{")
+ ;; 3.8.7 Low-level Commands
+ ("citename" "[[{[{") ("citelist" "[[{[{") ("citefield" "[[{[{")
+ ;; 3.8.8 Miscellaneous Commands
+ ("citereset" "*") ("RN" "{") ("Rn" "{")
+ ;; 3.9 Localization Commands
+ ("DefineBibliographyStrings" "{{") ("DefineBibliographyExtras" "{{")
("UndefineBibliographyExtras" "{{") ("DefineHyphenationExceptions" "{{")
- ("NewBibliographyString" "{") ("autocites" "(([[{") ("Autocites" "(([[{")
- ("cites" "(([[{") ("Cites" "(([[{") ("parencites" "(([[{") ("Parencites"
"(([[{")
- ("footcites" "(([[{") ("footcitetexts" "(([[{") ("smartcites" "(([[{")
- ("Smartcites" "(([[{") ("textcites" "(([[{") ("Textcites" "(([[{")
("supercites" "(([[{"))
+ ("NewBibliographyString" "{"))
font-lock-constant-face 2 command)
("reference"
(("nocite" "*{") ("cite" "*[[{") ("label" "{") ("pageref" "{")
- ("vref" "*{") ("eqref" "{") ("ref" "{") ("include" "{")
+ ("vref" "*{") ("eqref" "{") ("ref" "{") ("Ref" "{") ("include" "{")
("input" "{") ("bibliography" "{") ("index" "{") ("glossary" "{")
("footnote" "[{") ("footnotemark" "[") ("footnotetext" "[{")
("marginpar" "[{"))
@@ -305,7 +356,9 @@ variable `font-latex-fontify-sectioning'." ',num)
("newcounter" "{[") ("renewenvironment" "*{[[{{")
("renewcommand" "*|{\[[{") ("renewtheorem" "{[{[")
("usepackage" "[{[") ("fbox" "{") ("mbox" "{") ("rule" "[{{")
- ("addvspace" "{") ("vspace" "*{") ("hspace" "*{") ("thinspace" "")
("negthinspace" "")
+ ("addvspace" "{") ("vspace" "*{") ("hspace" "*{")
+ ("thinspace" "") ("negthinspace" "")
+ ("labelformat" "{{")
;; XXX: Should macros without arguments rather be listed in a
;; separate category with 'noarg instead of 'command handling?
("enspace" "") ("enskip" "") ("quad" "") ("qquad" "") ("nonumber" "")
@@ -523,7 +576,11 @@ use."
(4 (font-latex-matched-face 4) append t)
(5 (font-latex-matched-face 5) append t)
(6 (font-latex-matched-face 6) append t)
- (7 (font-latex-matched-face 7) append t)))
+ (7 (font-latex-matched-face 7) append t)
+ (8 (font-latex-matched-face 8) append t)
+ (9 (font-latex-matched-face 9) append t)
+ (10 (font-latex-matched-face 10) append t)
+ (11 (font-latex-matched-face 11) append t)))
((eq type 'noarg)
`(,(intern (concat prefix name))
(0 ,face)))
@@ -1714,6 +1771,14 @@ marks boundaries for searching for group ends."
"List of characters directly after \"\\" excluded from fontification.
Each character is a string.")
+(defvar font-latex-match-simple-include-list '("@")
+ "List of characters allowed in a macro for fontification.
+Each character is a string. This variable is initialized to
+\"@\" since internal LaTeX commands are very often redefined in a
+.tex file and the fontification should work correctly in those
+cases.")
+(make-variable-buffer-local 'font-latex-match-simple-include-list)
+
(defun font-latex-match-simple-command (limit)
"Search for command like \foo before LIMIT."
;; \s_ matches chars with symbol syntax, \sw chars with word syntax,
@@ -1726,7 +1791,20 @@ Each character is a string.")
;; like `\__module_foo:nnn'
(let* ((search (lambda ()
(TeX-re-search-forward-unescaped
- "\\\(\s_\|\sw\|\s.\)\(?:\s_\|\sw\)*" limit t)))
+ (concat
+ ;; Chars directly after backslash
+ "\\\(\s_\|\sw\|\s.\)"
+ ;; Start group of the following chars
+ "\(?:["
+ ;; a-zA-Z are always allowed:
+ "a-zA-Z"
+ ;; Additional characters added by AUCTeX styles
+ (mapconcat #'identity
+ font-latex-match-simple-include-list
+ "")
+ ;; End group
+ "]\)*")
+ limit t)))
(pos (funcall search)))
(while (and pos
(member (match-string 1)
diff --git a/latex.el b/latex.el
index d260006..514ffbb 100644
--- a/latex.el
+++ b/latex.el
@@ -1,6 +1,6 @@
;;; latex.el --- Support for LaTeX documents.
-;; Copyright (C) 1991, 1993-2018 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993-2019 Free Software Foundation, Inc.
;; Maintainer: address@hidden
;; Keywords: tex
@@ -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))
@@ -2351,7 +2352,8 @@ of the options, nil otherwise."
packages))
(insert LaTeX-optop options LaTeX-optcl))
(insert TeX-grop (mapconcat 'identity packages ",") TeX-grcl)
- (run-hooks 'LaTeX-after-usepackage-hook))
+ (run-hooks 'LaTeX-after-usepackage-hook)
+ (apply #'TeX-run-style-hooks packages))
(defun LaTeX-arg-usepackage (_optional)
"Insert arguments to usepackage.
@@ -2359,8 +2361,7 @@ OPTIONAL is ignored."
(let* ((packages-options (LaTeX-arg-usepackage-read-packages-with-options))
(packages (car packages-options))
(options (cdr packages-options)))
- (LaTeX-arg-usepackage-insert packages options)
- (apply #'TeX-run-style-hooks packages)))
+ (LaTeX-arg-usepackage-insert packages options)))
(defun LaTeX-insert-usepackages ()
"Prompt for the insertion of usepackage macros until empty
@@ -2791,6 +2792,8 @@ Automatic right brace insertion is done only if no prefix
ARG is given and
`LaTeX-electric-left-right-brace' is non-nil.
Normally bound to keys \(, { and [."
(interactive "*P")
+ ;; If you change the condition for `auto-p', adjust the condition in
+ ;; the `delete-selection' property, just below this defun, accordingly
- [AUCTeX-diffs] [elpa] externals/auctex 85dd4fe 73/80: Delete \Ref and \labelformat from varioref.el, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 85dd4fe 73/80: Delete \Ref and \labelformat from varioref.el, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex cc52bce 77/80: Fix for revised file access controls of gs (bug#37719), Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex dc5e90e 66/80: Add new style/multitoc.el, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 01dc048 78/80: Change default for new Ghostscript, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex c5e47f8 80/80: ; Recompile using GNUMakefile after merge from origin/master, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 3e179f8 53/80: Update style/fvextra.el to package version 1.4, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex d93db40 72/80: * latex.el (LaTeX-common-initialization): Add \Ref to `TeX-complete-list'., Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 3542a23 70/80: Update style/subcaption.el to package version 1.3, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex 7cd329f 74/80: Add fontification support for ragged2e macros, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex eafb114 75/80: Fix preview-latex for TeXLive 2019 update, Tassilo Horn, 2019/10/16
- [AUCTeX-diffs] [elpa] externals/auctex c6d6c19 79/80: Merge remote-tracking branch 'origin/master' into externals/auctex,
Tassilo Horn <=