[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
main c3906824 028/257: Merge from upstream.
From: |
Tassilo Horn |
Subject: |
main c3906824 028/257: Merge from upstream. |
Date: |
Fri, 19 Apr 2024 15:36:18 -0400 (EDT) |
branch: main
commit c3906824a707f658729de91fba3ba8a7b791d220
Merge: 6ff4fca5 59ccf341
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Merge from upstream.
---
.gitignore | 18 ++
ChangeLog | 377 +++++++++++++++++++++++++++++++++++++++
ChangeLog-preview | 17 ++
Makefile-preview.in | 162 -----------------
Makefile.in | 152 +++++++++++-----
auctex.info | 368 +++++++++++++++++++++-----------------
auto-preview.el.in => auto.el.in | 0
autogen.sh | 5 +-
bib-cite.el | 84 ++++-----
configure-preview.ac | 226 -----------------------
configure.ac | 161 ++++++++++++++---
context.el | 47 ++---
doc/Makefile.in | 4 +-
doc/auctex.texi | 37 +++-
doc/changes.texi | 12 ++
doc/faq.texi | 20 ++-
doc/quickstart.texi | 8 +-
latex.el | 132 +++++++++-----
latex/README | 64 -------
multi-prompt.el | 7 +-
preview-latex.info | 76 ++++----
preview.el | 117 ++++++------
prv-install.el | 4 +-
style/AnonymousPro.el | 90 ++++++++++
style/CJK.el | 6 +-
style/MinionPro.el | 45 +++--
style/MyriadPro.el | 90 ++++++++++
style/XCharter.el | 76 ++++++++
style/amsmath.el | 6 +-
style/amsthm.el | 4 +-
style/beamer.el | 20 +--
style/book.el | 4 +-
style/csquotes.el | 4 +-
style/dinbrief.el | 36 ++--
style/dk-bib.el | 4 +-
style/emp.el | 14 +-
style/epsf.el | 6 +-
style/eso-pic.el | 91 ++++++++++
style/filecontents.el | 4 +-
style/foils.el | 23 ++-
style/fontaxes.el | 114 ++++++++++++
style/fontspec.el | 4 +-
style/graphicx.el | 40 ++---
style/ifluatex.el | 61 +++++++
style/inputenc.el | 4 +-
style/letter.el | 18 +-
style/longtable.el | 4 +-
style/luatextra.el | 44 +++++
style/mathtools.el | 10 +-
style/mdsymbol.el | 99 ++++++++++
style/natbib.el | 8 +-
style/paralist.el | 2 +-
style/plext.el | 8 +-
style/prosper.el | 4 +-
style/psfig.el | 17 +-
style/pstricks.el | 4 +-
style/scrbase.el | 24 +--
style/scrlttr2.el | 6 +-
style/textcomp.el | 178 ++++++++++++++++++
style/zlmtt.el | 58 ++++++
tex-buf.el | 146 ++++++++++++---
tex-fold.el | 13 +-
tex-info.el | 27 +--
tex.el | 301 +++++++++++++++++++------------
toolbar-x.el | 7 +-
65 files changed, 2589 insertions(+), 1233 deletions(-)
diff --git a/.gitignore b/.gitignore
index 6a5d2af2..7ddb905c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,8 +19,26 @@ tex-site.el.out
# Files generated while building the auto-generated files included in elpa.
doc/preview-dtxdoc.texi
doc/version.texi
+
+auto.el
+latex/prauctex.cfg
+latex/prauctex.def
+latex/prcounters.def
latex/preview-mk.ins
+latex/preview.aux
latex/preview.drv
+latex/preview.dvi
+latex/preview.pdf
+latex/preview.sty
+latex/prfootnotes.def
+latex/prlyx.def
+latex/prshowbox.def
+latex/prshowlabels.def
+latex/prtightpage.def
+latex/prtracingall.def
+preview-latex.el
+preview.el
+PROBLEMS.preview
# Files generated when installing/compiling the package in place.
auctex-pkg.el
diff --git a/ChangeLog b/ChangeLog
index a4d5c528..cea97e3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,380 @@
+2014-11-28 Mos� Giordano <mose@gnu.org>
+
+ * tex.el (TeX-view-program-list-builtin): Add the new third
+ element to each item.
+ (TeX-view-program-list): Document new third element of items in
+ doc string. Adapt the type.
+ (TeX-view-command-raw): Check whether the viewer executable
+ exists. (Bug#19121)
+
+ * doc/auctex.texi (Starting Viewers): Document change to
+ `TeX-view-program-list'.
+
+ * doc/changes.texi: Mention it.
+
+2014-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * style/siunitx.el (tex): Require tex because its indispensable
+ when compiling the call to TeX-auto-add-type.
+
+ * style/acronym.el (tex): Ditto.
+
+ * style/acro.el (tex): Ditto.
+
+2014-11-27 Mos� Giordano <mose@gnu.org>
+
+ * latex.el (LaTeX-label-alist): Expand doc string.
+ (LaTeX-label): Make second argument optional to restore backward
+ compatibility and update doc string accordingly. (Bug#19178)
+
+2014-11-27 Matthew Leach <matthew@mattleach.net>
+
+ * configure.ac: Merge from preview/configure.ac.
+
+ * .gitignore: Merge from preview/.gitignore.
+
+ * autogen.sh: Don't run autoconf in the preview direcotry.
+
+ * Makefile.in (subdirs): Remove.
+ (DESCEND): Remove.
+ (EXCLUDEDFILES): Remove 'preview/' prefix.
+ (preview-ball): Likewise and decrement stip-components in tar.
+ (previewstartfile): Adapt from preview/Makefile.in.
+ (PREVIEW_AUTOLOAD): Likewise.
+ (texmf): Likewise.
+ (preview-latex.el): Likewise.
+ (latex/Makefile): Likewise.
+ (auto.el): Likewise.
+ (install-startup): Likewise.
+ (install-texmf): Likewise.
+ (release-commit): Likewise.
+ (DISTCLEANFILES): Likewise.
+ (CLEANFILES): Add preview files.
+ (install-el): Likewise.
+ (install-lisp): Likewise.
+ (all): Add texmf dependency and remove DESCEND.
+ (clean): Remove DESCEND action.
+ (distclean): Likewise.
+ (maintainer-clean): Likewise.
+
+ * doc/Makefile.in (preview-dtxdoc.texi): Update path of
+ preview.dtx.
+
+ * preview/ChangeLog: Move to ChangeLog-preview
+
+ * preview/ChangeLog.1: Move to ChangeLog.1-preview
+
+ * preview/auto.el.in: Move to top-level.
+
+ * preview/circ.tex: Move to top-level.
+
+ * preview/preview.el.in: Move to top-level.
+
+ * preview/*.el: Move to top-level.
+
+ * preview/images/: Move to images/.
+
+ * preview/latex/: Move to latex/.
+
+ * preview/Makefile.in: Remove.
+
+ * preview/configure.ac: Remove.
+
+ * preview/.gitignore: Remove.
+
+ * preview/COPYING: Remove.
+
+2014-11-21 Tassilo Horn <tsdh@gnu.org>
+
+ * doc/auctex.texi (Starting a Command): Document
+ LaTeX-command-section and friends.
+
+ * style/book.el ("book"): Set LaTeX-largest-level to part instead
+ of chapter.
+
+ * tex-buf.el (LaTeX-command-section-level): New variable.
+ (LaTeX-command-section-level): New function.
+ (LaTeX-command-section-change-level, LaTeX-command-section): New
+ commands.
+
+ * latex.el (LaTeX-mode-map): Bind C-c C-z to LaTeX-command-section
+ and C-c M-z to LaTeX-command-section-change-level.
+
+ * tex.el (TeX-evince-sync-view): Use line/col information from the
+ TeX-region buffer if the View command is made on a region.
+
+ * tex-buf.el (TeX-region-create): Position point in the same
+ line/col as in the original buffer to make forward search work.
+
+2014-11-20 Mos� Giordano <mose@gnu.org>
+
+ * latex.el (LaTeX-env-figure): Fix indentation when there is the
+ \centering macro and no caption is inserted.
+
+ * style/fontspec.el ("fontspec"): Fix fontification of
+ "newfontfamily" and "newfontface".
+
+2014-11-19 Tassilo Horn <tsdh@gnu.org>
+
+ * tex.el (TeX-source-correlate-sync-source): Make backward/inverse
+ search form PDF to tex work also for TeX-regions.
+
+ * tex-buf.el (TeX-region-orig-buffer): New variable.
+ (TeX-region-create): Set TeX-region-orig-buffer.
+
+ * tex.el (TeX-submit-bug-report): Adapt bug report intro text to
+ mention debbugs url.
+
+2014-11-18 Arash Esbati <esbati@gmx.de>
+
+ * style/zlmtt.el (font-latex-add-keywords): Use more consistent
+ fontification.
+
+ * style/textcomp.el (font-latex-add-keywords): Ditto.
+
+ * style/fontaxes.el (font-latex-add-keywords): Ditto.
+
+ * style/XCharter.el (font-latex-add-keywords): Ditto.
+
+2014-11-18 Tassilo Horn <tsdh@gnu.org>
+
+ * tex-buf.el (TeX-region-create): Disable finding of appropriate
+ major-mode for region file. Also disable file-local vars, and
+ don't run find-file-hook functions. Also, make the region file
+ read-only to prevent accidental editing where actually the real
+ file should have been edited (happens easily with source
+ correlation mode).
+
+2014-11-16 Mos� Giordano <mose@gnu.org>
+
+ * Makefile.in (WEMACSDATAROOTDIR, WEMACSSITELISP): New variables.
+ (WPACKAGEFILES): Update accordingly.
+ (windows-package): Fix structure of the package for Emacs 24.4.
+ Reported by Uwe Siart. Remove the zip package before creating it,
+ otherwise it would be updated instead of recreated.
+ Mention that bash shell is required for windows-package and
+ release-upload recipes due to some bashisms in them. Reported by
+ Jos� Carlos Santos.
+
+2014-11-15 Mos� Giordano <mose@gnu.org>
+
+ * Makefile.in (WEMACSPACKAGE, WEMACSEXTRACTDIR): New variables.
+ (windows-package): Adapt rule to new Emacs 24.4 package for
+ Windows. Use `WEMACSPACKAGE' and `WEMACSEXTRACTDIR'.
+
+2014-11-15 Davide G. M. Salvetti <salve@linux.it>
+
+ * Makefile.in (STYLESRC): Add `ifluatex.el', `luatextra.el'.
+
+ * style/luatextra.el: New style.
+
+ * style/ifluatex.el: New style.
+
+ * doc/faq.texi: Update the `Why does 'TeX-next-error' ('C-c `')
+ fail?' entry, taking into account the `TeX-file-line-error'
+ option. Update copyright range.
+
+ * doc/auctex.texi (Selecting a Command): Fix typo.
+ (Automatic Local): Update description of `TeX-style-path',
+ `TeX-style-global', `TeX-style-local', and `TeX-auto-local'
+ variables: there is no need to end directories and directories
+ lists items with a slash.
+
+ * doc/quickstart.texi (Editing Facilities): Fix documentation: to
+ change font attributes of existing text, it has to be marked as an
+ _active_ region.
+
+2014-11-10 Davide G. M. Salvetti <salve@linux.it>
+
+ * context.el: Replace `read-string' with `TeX-read-string'.
+
+ * latex.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/CJK.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/amsmath.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/amsthm.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/beamer.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/csquotes.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/dinbrief.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/dk-bib.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/emp.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/epsf.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/filecontents.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/foils.el: Replace `read-string' with `TeX-read-string';
+ add copyright notice.
+
+ * style/graphicx.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/inputenc.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/letter.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/longtable.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/mathtools.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/natbib.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/paralist.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/plext.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/prosper.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/psfig.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/pstricks.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/scrbase.el: Replace `read-string' with `TeX-read-string'.
+
+ * style/scrlttr2.el: Replace `read-string' with `TeX-read-string'.
+
+ * tex-info.el: Replace `read-string' with `TeX-read-string'.
+
+ * tex.el: Replace `read-string' with `TeX-read-string'.
+
+2014-11-04 Tassilo Horn <tsdh@gnu.org>
+
+ * tex.el (VirTeX-common-initialization): Define a variable alias
+ for find-file-hook on XEmacs.
+
+2014-11-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * toolbar-x.el: Adjust copyright years.
+ (require): Require cl at compile-time.
+ (toolbarx-good-option-list-p): Use pushnew instead of add-to-list.
+
+ * tex.el (url-unreserved-chars): Declare to silence byte-compiler.
+ (TeX-tree-expand): Use pushnew instead of add-to-list. Iterate
+ path-list in reversed order.
+ (TeX-style-path): Use mapc instead of mapcar for side-effects.
+ (TeX-file-extensions, BibTeX-file-extensions)
+ (TeX-Biber-file-extensions): Declare to silence byte-compiler.
+ (TeX-tree-roots): Use pushnew instead of add-to-list.
+ (TeX-search-files-by-type): Use setq/pushnew instead of
+ dolist/add-to-list.
+ (TeX-doc): Use pushnew instead of add-to-list.
+
+ * tex-info.el (require): Require cl at compile-time.
+ (Texinfo-insert-node): Use pushnew instead of add-to-list.
+ (reftex-section-levels-all, reftex-level-indent)
+ (reftex-label-menu-flags, reftex-tables-dirty): Always
+ forward-declare (not only at compile-time).
+ (when): declare-function only at compile-time.
+
+ * tex-fold.el: Adjust copyright years.
+ (require): Require cl at compile-time.
+ (TeX-fold-region-macro-or-env, TeX-fold-update-at-point): Use
+ pushnew instead of add-to-list.
+ (TeX-fold-hide-item): Use setq instead of add-to-list.
+
+ * tex-buf.el (font-lock-mode-enable-list)
+ (font-lock-auto-fontify, font-lock-defaults-alist): Declare vars
+ to silence byte-compiler.
+
+ * multi-prompt.el: Adjust copyright years.
+ (multi-prompt): Don't let-bind unused var done.
+ (multi-prompt-next-must-match): Use minibuffer-completion-table
+ instead of dynamically bound table.
+
+ * latex.el (require): Require cl at compile-time.
+ (title, name, level, done-mark, toc): Declare dynamic vars.
+ (LaTeX-env-document, TeX-arg-index-tag, TeX-arg-document)
+ (LaTeX-arg-usepackage, TeX-arg-verb, ): Rename unused arg.
+ (LaTeX-listify-package-options): Use setq instead of add-to-list
+ to add to local var.
+ (reftex-ref-macro-prompt, TeX-arg-item-label-p)
+ (TeX-arg-right-insert-p): Declare to silence byte-compiler.
+ (LaTeX-indent-line): Use pushnew instead of add-to-list.
+ (LaTeX-fill-move-to-break-point): Don't let-bind unused math-sep.
+ (LaTeX-section-enable-symbol): Downcase arg.
+ (LaTeX-indent-tabular): Use mapc instead of mapcar for
+ side-effects.
+
+ * context.el (done-mark, reference, title, name, level): Declare
+ dynamic vars without global nil value.
+ (ConTeXt-section): let-bind reference. Remove binding of unused
+ var toc.
+ (ConTeXt-numbered-section-hook, ConTeXt-unnumbered-section-hook):
+ Improve docstring.
+ (ConTeXt-find-matching-stop): Don't let-bind pos.
+ (ConTeXt-optional-argument-insert)
+ (ConTeXt-required-argument-insert, ConTeXt-indent-line): Rename
+ unused arg.
+ (ConTeXt-mode-common-initialization): Use fboundp to check if
+ make-local-hook is defined.
+
+ * bib-cite.el: Expand copyright years.
+ (bib-cite-is-XEmacs): Remove.
+ (bib-cite-minor-mode, bib-cite-setup-highlight-mouse-keymap)
+ (bib-etags, bib-highlight-mouse, bib-toggle-highlight)
+ (bib-etags-find-noselect): Check for XEmacs with featurep.
+ (bib-cite-setup-mouse-function): Rename unused arg.
+ (bib-apropos): Use mapc instead of mapcar for side effects.
+ (bib-cite-fontify-help-xemacs): Define only on XEmacs.
+ (bib-cite-fontify-help-as-bibtex, bib-cite-fontify-help-as-latex):
+ Check for XEmacs with featurep. Fix fontification code.
+ (bib-display-this-ref): Use point-min instead of 1.
+ (TeX-auto-save, TeX-auto-update, TeX-auto-regexp-list): Declare to
+ silence the byte-compiler.
+
+2014-11-03 Arash Esbati <esbati@gmx.de>
+
+ * style/zlmtt.el: New file.
+
+ * style/XCharter.el: New file.
+
+ * style/textcomp.el: New file.
+
+ * style/MyriadPro.el: New file.
+
+ * style/mdsymbol.el: New file.
+
+ * style/fontaxes.el: New file.
+
+ * style/eso-pic.el: New file.
+
+ * style/AnonymousPro.el: New file.
+
+2014-11-02 Arash Esbati <esbati@gmx.de>
+
+ * style/MinionPro.el (TeX-add-symbols): Remove `figureversion',
+ `textsw', `textssc', `sscshape' and `swshape'.
+ (TeX-run-style-hooks): Added "fontaxes".
+
+ * style/MinionPro.el (LaTeX-MinionPro-package-options): Added
+ additional options from v2.3 of `MinionPro.sty', available from
+ <https://github.com/sebschub>
+
+2014-11-01 Davide G. M. Salvetti <salve@linux.it>
+
+ * tex.el (TeX-file-line-error): New customizable option.
+ (TeX-expand-list): New expander "$(file-line-error)".
+ (TeX-command-list): Use it.
+ (LaTeX-command-style): Use it.
+
+ * doc/auctex.texi (Processor Options): Document
+ `TeX-file-line-error'.
+
+ * doc/changes.texi: Mention `TeX-file-line-error'.
+
+2014-10-31 Mos� Giordano <mose@gnu.org>
+
+ * Makefile.in (CTANDIR): New variable.
+ (preview-ball): Create a top level directory "preview/" in the
+ preview tarball, as required by CTAN. Save the tarball to
+ $(CTANDIR) instead of $(FTPDIR).
+
2014-10-29 Mos� Giordano <mose@gnu.org>
* Version 11.88 released.
diff --git a/ChangeLog-preview b/ChangeLog-preview
index a3d3885e..b6518ebd 100644
--- a/ChangeLog-preview
+++ b/ChangeLog-preview
@@ -1,3 +1,20 @@
+2014-11-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * prv-install.el: Adjust copyright years.
+ (preview-make-package-xemacs): Use insert-file-contents instead of
+ insert-file.
+
+ * preview.el.in (error): Declare not only at compile-time.
+ (preview-expandable-string): Use explicit let instead of calling
+ lambda with another lambda.
+ (preview-mouse-open-eps): Use default-value of major-mode instead
+ of default-major-mode.
+ (preview-copy-text): Use with-current-buffer instead of
+ save-excursion with set-buffer.
+ (preview-parse-messages): Don't let-bind context. Use mapc +
+ funcall instead of run-hooks. Use goto-char + forward-line
+ instead of goto-line.
+
2014-10-29 Mos� Giordano <mose@gnu.org>
* Version 11.88 released.
diff --git a/Makefile-preview.in b/Makefile-preview.in
deleted file mode 100644
index c8b058c9..00000000
--- a/Makefile-preview.in
+++ /dev/null
@@ -1,162 +0,0 @@
-# Makefile for AUCTeX
-
-# Maintainer: auctex-devel@gnu.org
-
-# Copyright (C) 2001, 2002, 2003, 2004, 2005,
-# 2006 Free Software Foundation, Inc.
-
-# 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, 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 Street, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-
-@SET_MAKE@
-PACKAGE=preview
-PACKAGE_INFO=preview-latex
-EMACS=@EMACS@
-ELCC=$(EMACS) -batch -q -no-site-file -no-init-file
-AUCTEX=-eval '(let ((dir (pop command-line-args-left))) \
- (if (not (string-equal dir "")) (push dir load-path)))' $(auctexdir) --eval
'(push "." load-path)'
-AUTOLOAD=--eval '(let ((generated-autoload-file (expand-file-name "$@"))) \
- (update-file-autoloads "preview.el")(save-buffers-kill-emacs
t))'
-
-LISP_SOURCES = @PLAT_LISP@ preview.el
-LISP_OBJS = $(LISP_SOURCES:.el=.elc)
-
-ICON_SOURCES = \
- images/prverr16.xpm images/prverr20.xpm images/prverr24.xbm \
- images/prverr24.xpm images/prvtex-cap-up.xpm images/prvtex12.xbm \
- images/prvtex12.xpm images/prvtex16.xbm images/prvtex16.xpm \
- images/prvtex20.xpm images/prvtex24.xbm images/prvtex24.xpm \
- images/prvwrk12.xpm images/prvwrk14.xpm images/prvwrk16.xpm \
- images/prvwrk20.xpm images/prvwrk24.xbm images/prvwrk24.xpm
-
-prefix = @prefix@$(null)
-exec_prefix = @exec_prefix@$(null)
-libdir = @libdir@$(null)
-packagedatadir = @packagedatadir@$(null)
-datarootdir = @datarootdir@$(null)
-datadir = @datadir@$(null)
-previewstartfile = @previewstartfile@
-packagedir = @packagedir@$(null)
-packagelispdir = @packagelispdir@$(null)
-auctexdir = @auctexdir@$(null)
-DESTDIR=
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = ../mkinstalldirs
-
-all: texmf lisp install-hint
-
-lisp: $(LISP_OBJS)
- test "x$(packagedir)" != xno || $(MAKE) preview-latex.el
-
-texmf: latex/Makefile
- (cd latex ; $(MAKE) all)
-
-latex/Makefile: latex/Makefile.in Makefile config.status
- ./config.status
-
-auto.el: auto.el.in Makefile config.status
- ./config.status
-
-configure: configure.ac ../aclocal.m4
- autoconf -I..
-
-Makefile: Makefile.in config.status
- ./config.status
-
-config.status: configure
- ./config.status --recheck
-
-install-hint:
- @echo 'Congratulations! Build is complete.'
- @echo
- @echo 'Now, run "make install" as root, or whatever user has
permissions'
- @echo 'to write to the install directory.'
-
-
-.PHONY: install install-texmf install-el install-images install-startup \
- install-nosearch use-hint all lisp texmf
-
-install: install-texmf install-el install-nosearch install-images \
- install-startup use-hint
-
-use-hint:
- @echo "Installation completed."
- @echo
- @echo "Read the PROBLEMS file if you experience problems."
- @echo "Please use M-x preview-report-bug if you experience any"
- @echo "problems not mentioned in there."
-
-install-el: $(LISP_OBJS) auto.el
- -$(MKINSTALLDIRS) $(DESTDIR)$(packagelispdir)
- for x in $(LISP_SOURCES) ; do \
- echo $(INSTALL_DATA) $$x $(DESTDIR)$(packagelispdir) ; \
- $(INSTALL_DATA) $$x $(DESTDIR)$(packagelispdir) ; \
- echo $(INSTALL_DATA) $${x}c $(DESTDIR)$(packagelispdir) ; \
- $(INSTALL_DATA) $${x}c $(DESTDIR)$(packagelispdir) ; \
- done
-
-install-nosearch:
- -$(MKINSTALLDIRS) $(DESTDIR)$(packagedatadir)
- : >$(DESTDIR)$(packagedatadir)/.nosearch
-
-install-images: $(ICON_SOURCES)
- -$(MKINSTALLDIRS) $(DESTDIR)$(packagedatadir)/images
- for x in $(ICON_SOURCES); do \
- echo $(INSTALL_DATA) $$x $(DESTDIR)$(packagedatadir)/images ; \
- $(INSTALL_DATA) $$x $(DESTDIR)$(packagedatadir)/images ; \
- done
-
-install-texmf:
- (cd latex ; $(MAKE) DESTDIR=$(DESTDIR) install)
-
-install-startup:
- test $(packagedir) != no || $(MAKE) preview-latex.el
- test $(packagedir) != no || \
- $(INSTALL_DATA) preview-latex.el $(DESTDIR)$(previewstartfile)
-
-$(LISP_OBJS): $(LISP_SOURCES)
- for x in $(LISP_SOURCES) ; do \
- echo $(ELCC) $(AUCTEX) -f batch-byte-compile $$x ; \
- $(ELCC) $(AUCTEX) -f batch-byte-compile $$x ; \
- done
-
-preview-latex.el: preview.el auto.el
- rm -f preview-latex.el
- -$(EMACS) -batch -no-site-file -no-init-file $(AUTOLOAD) ; \
- test -r $@ || { \
- echo ";; Auto-generated preview-latex.el" > $@ ; \
- echo "" >> $@ ; \
- $(EMACS) -batch -no-site-file -no-init-file $(AUTOLOAD) ; \
- }
- cat auto.el >> $@
-
-.PHONY: clean distclean maintainer-clean tarball-ready
-
-clean:
- rm -f latex.out testdocstrip.tex preview-latex.el
- rm -rf *.prv *.elc *~ *.aux *.dvi *.log
- (cd latex ; $(MAKE) clean)
-
-distclean: clean
- rm -f config.log config.cache config.status
- rm -f Makefile */Makefile auto.el
-
-maintainer-clean:
- $(MAKE) distclean
- rm -rf autom4te.cache
diff --git a/Makefile.in b/Makefile.in
index d36a9db6..950a27a2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,12 +34,12 @@ localstatedir = @localstatedir@$(null)
infodir = @infodir@$(null)
lispdir = @lispdir@$(null)
auctexstartfile=@auctexstartfile@
+previewstartfile = @previewstartfile@
packagelispdir = @packagelispdir@$(null)
packagedatadir = @packagedatadir@$(null)
packagedir = @packagedir@$(null)
autodir = @autodir@$(null)
preview_enabled=@preview_enabled@
-subdirs=@subdirs@
styledir = $(packagedatadir)/style
AUCTEXDATE = @AUCTEXDATE@
AUCTEXVERSION = @AUCTEXVERSION@
@@ -56,10 +56,11 @@ 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) \
(save-buffers-kill-emacs t))'
-DESCEND=test -z "$(subdirs)" || (OLDPWD="`pwd`";for i in ""$(subdirs);do cd
$$i;echo "Descending into `pwd`";$(MAKE) 'DESTDIR=$(DESTDIR)'
PACKAGE=$(PACKAGE) $@ || exit $$?;cd "$$OLDPWD";echo "Ascending into
$$OLDPWD";done)
-EXCLUDEDFILES=autogen.sh .cvsignore .gitignore doc/.gitignore
preview/.gitignore \
- preview/latex/.gitignore README.GIT tests
+PREVIEW_AUTOLOAD=--eval '(let ((generated-autoload-file (expand-file-name
"$@"))) \
+ (update-file-autoloads "preview.el")(save-buffers-kill-emacs
t))'
+
+EXCLUDEDFILES=autogen.sh .cvsignore .gitignore doc/.gitignore README.GIT tests
.SUFFIXES: .el .elc .texi
@@ -70,6 +71,7 @@ CP_A = $(CP) -R
DIST_PREFIX=$(PWD)/auctex-dist
FTPDIR = $(DIST_PREFIX)/ftp
WWWDIR = $(DIST_PREFIX)/www
+CTANDIR = $(DIST_PREFIX)/ctan
XEMACS_BUILD_DIR = xemacs-build
PREVIEW_BUILD_DIR = preview-build
COMMITTER="`git config --get user.name`\ \ \<`git config --get user.email`\>"
@@ -134,18 +136,44 @@ STYLESRC = style/prosper.el \
style/acronym.el style/xparse.el style/fancyvrb.el \
style/tabulary.el style/fontspec.el style/unicode-math.el \
style/luacode.el style/metalogo.el style/english.el \
- style/exercise.el style/plext.el style/cleveref.el
+ style/exercise.el style/plext.el style/cleveref.el \
+ style/eso-pic.el style/fontaxes.el style/AnonymousPro.el \
+ style/mdsymbol.el style/MyriadPro.el style/textcomp.el \
+ style/XCharter.el style/zlmtt.el style/ifluatex.el \
+ style/luatextra.el
STYLEELC = $(STYLESRC:.el=.elc)
-CLEANFILES = $(AUCELC) $(STYLEELC) $(MULEELC)
+ifeq (@preview_enabled@,yes)
+ PREVIEWSRC = @PLAT_LISP@ preview.el
+ PREVIEWELC = $(PREVIEWSRC:.el=.elc)
+ PREVIEWLATEX = test "x$(packagedir)" != xno || $(MAKE) preview-latex.el
+ TEXMF = (cd latex ; $(MAKE) all)
+
+ # Install actions
+ INS_TEXMF = (cd latex ; $(MAKE) DESTDIR=$(DESTDIR) install)
+ PREVIEW_INS_STARTUP = test $(packagedir) != no || \
+ $(INSTALL_DATA) preview-latex.el $(DESTDIR)$(previewstartfile)
+else
+ # Don't do anything with preview if the user doesn't want the
+ # preview component.
+ PREVIEWSRC =
+ PREVIEWELC =
+ PREVIEWLATEX =
+ TEXMF =
+ INS_TEXMF =
+ PREVIEW_INS_STARTUP =
+endif
+
+
+
+CLEANFILES = $(AUCELC) $(STYLEELC) $(MULEELC) $(PREVIEWELC) preview-latex.el
DISTCLEANFILES = Makefile tex-site.el tex-site.el.out auctex.el \
- auto-loads.el config.* preview/preview.el
+ auto-loads.el config.* preview.el
DISTTEXTS = FAQ INSTALL INSTALL.windows README TODO PROBLEMS.preview
NOSEARCH = style/.nosearch
-all: lisp docs
- $(DESCEND)
+all: texmf lisp docs
.PHONY: all lisp info dvi some install install-el install-lisp docs \
install-docs install-auto install-metadata install-startup \
@@ -154,8 +182,22 @@ all: lisp docs
tar-ball rpm-packages wc xemacs-package windows-package \
release-sign release-upload preview-ball
-lisp: tex-site.el $(AUCSRC) $(STYLESRC) $(MULESRC)
- $(ELCC) -f batch-byte-compile $(AUCSRC) $(STYLESRC) $(MULESRC)
+texmf: latex/Makefile
+ $(TEXMF)
+
+lisp: tex-site.el $(AUCSRC) $(STYLESRC) $(MULESRC) $(PREVIEWSRC)
+ $(ELCC) -f batch-byte-compile $(AUCSRC) $(STYLESRC) $(MULESRC)
$(PREVIEWSRC)
+ $(PREVIEWLATEX)
+
+preview-latex.el: preview.el auto.el
+ rm -f preview-latex.el
+ -$(EMACS) -batch -no-site-file -no-init-file $(PREVIEW_AUTOLOAD) ; \
+ test -r $@ || { \
+ echo ";; Auto-generated preview-latex.el" > $@ ; \
+ echo "" >> $@ ; \
+ $(EMACS) -batch -no-site-file -no-init-file $(PREVIEW_AUTOLOAD) ; \
+ }
+ cat auto.el >> $@
docs:
cd doc ; $(MAKE) all
@@ -178,6 +220,12 @@ tex-site.el.out: tex-site.el.in Makefile config.status
auctex.el: auctex.el.in config.status
./config.status
+latex/Makefile: latex/Makefile.in Makefile config.status
+ ./config.status
+
+auto.el: auto.el.in Makefile config.status
+ ./config.status
+
configure: configure.ac aclocal.m4
autoconf
@@ -203,8 +251,8 @@ auto-loads.el: $(AUCSRC) $(MULESRC) Makefile
some: $(AUCELC) $(STYLEELC)
-install: install-lisp install-docs install-images install-startup
- $(DESCEND)
+install: install-texmf install-lisp install-docs install-images \
+ install-startup
$(MAKE) 'DESTDIR=$(DESTDIR)' install-metadata
install-man: doc/Makefile
@@ -212,9 +260,14 @@ install-man: doc/Makefile
$(INSTALL_DATA) RELEASE $(DESTDIR)$(packagedir)/man/auctex
install-startup:
+ $(PREVIEWLATEX)
+ $(PREVIEW_INS_STARTUP)
test $(packagedir) != no || \
$(INSTALL_DATA) auctex.el $(DESTDIR)$(auctexstartfile)
+install-texmf:
+ $(INS_TEXMF)
+
install-el:
-$(MKINSTALLDIRS) $(DESTDIR)$(lispdir)
rm -f $(DESTDIR)$(packagelispdir)/tex-site.el # Remove old
(Git-version) mistakes
@@ -231,10 +284,10 @@ install-el:
else rm -f $(DESTDIR)$(lispdir)/tex-site.el ; \
fi
-$(MKINSTALLDIRS) $(DESTDIR)$(packagelispdir)
- @: $(MAKE) ; for x in $(AUCSRC) $(MULESRC); do \
+ @: $(MAKE) ; for x in $(AUCSRC) $(MULESRC) $(PREVIEWSRC); do \
echo '$(INSTALL_DATA)' $$x '$(DESTDIR)$(packagelispdir)' ; \
done
- @for x in $(AUCSRC) $(MULESRC); do \
+ @for x in $(AUCSRC) $(MULESRC) $(PREVIEWSRC); do \
$(INSTALL_DATA) $$x $(DESTDIR)$(packagelispdir) ; \
done;
-$(MKINSTALLDIRS) $(DESTDIR)$(styledir)
@@ -249,10 +302,10 @@ install-el:
-$(INSTALL_DATA) $(NOSEARCH) $(DESTDIR)$(autodir)
install-lisp: some install-el
- @: $(MAKE) ; for x in $(AUCSRC) $(MULESRC); do \
+ @: $(MAKE) ; for x in $(AUCSRC) $(MULESRC) $(PREVIEWSRC); do \
echo '$(INSTALL_DATA)' $${x}c '$(DESTDIR)$(packagelispdir)' ; \
done
- @for x in $(AUCSRC) $(MULESRC); do \
+ @for x in $(AUCSRC) $(MULESRC) $(PREVIEWSRC); do \
$(INSTALL_DATA) $${x}c $(DESTDIR)$(packagelispdir) ; \
done
@: $(MAKE) ; for x in $(STYLESRC) ; do \
@@ -283,9 +336,9 @@ install-metadata:
test "x$(packagedir)" = xno || { \
$(MKINSTALLDIRS) $(DESTDIR)$(packagedir)/pkginfo || : ; \
if test "x$(preview_enabled)" = xyes; then \
- $(ELCC) -l preview/prv-install -f preview-make-package
$(DESTDIR)$(packagedir) "$(PACKAGE)" \"`echo $(AUCTEXDATE)|sed
's/\(.*\)-\(.*\)-\(.*\)/\1.\2\3/'`\" \"$(AUCTEXVERSION)\" tex-site.el
preview/auto.el; \
+ $(ELCC) -l prv-install -f preview-make-package
$(DESTDIR)$(packagedir) "$(PACKAGE)" \"`echo $(AUCTEXDATE)|sed
's/\(.*\)-\(.*\)-\(.*\)/\1.\2\3/'`\" \"$(AUCTEXVERSION)\" tex-site.el auto.el; \
else \
- $(ELCC) -l preview/prv-install -f preview-make-package
$(DESTDIR)$(packagedir) "$(PACKAGE)" \"`echo $(AUCTEXDATE)|sed
's/\(.*\)-\(.*\)-\(.*\)/\1.\2\3/'`\" \"$(AUCTEXVERSION)\" tex-site.el; \
+ $(ELCC) -l prv-install -f preview-make-package
$(DESTDIR)$(packagedir) "$(PACKAGE)" \"`echo $(AUCTEXDATE)|sed
's/\(.*\)-\(.*\)-\(.*\)/\1.\2\3/'`\" \"$(AUCTEXVERSION)\" tex-site.el; \
fi && \
cd $(DESTDIR)$(packagedir) && \
find "etc/$(PACKAGE)" "lisp/$(PACKAGE)" -print
>"pkginfo/MANIFEST.$(PACKAGE)" && \
@@ -301,19 +354,16 @@ install-metadata:
clean: doc/Makefile
rm -f $(CLEANFILES)
cd doc && $(MAKE) clean
- $(DESCEND)
distclean: doc/Makefile
rm -f $(CLEANFILES) $(DISTCLEANFILES)
cd doc && $(MAKE) distclean
- $(DESCEND)
maintainer-clean: doc/Makefile
rm -f $(DISTTEXTS)
rm -rf autom4te.cache
rm -f $(CLEANFILES) $(DISTCLEANFILES)
cd doc && $(MAKE) maintainer-clean
- $(DESCEND)
extraclean: maintainer-clean
rm -f *~ \#*\#
@@ -346,9 +396,11 @@ wc:
# 4) windows-package WEMACSVER=<emacs-version> TAG=<tag>
# Create the precompiled AUCTeX package for Windows.
# This requires a compiled Emacs of the same version at location $WEMACS.
+# NOTA BENE: you may need to use bash shell for this recipe to work.
#
# 5) release-sign TAG=<tag>
-# Sign the tar ball and create directive files for upload.
+# Sign the tar ball and create directive files for upload. NOTA BENE: you
+# may need to use bash shell for this recipe to work.
#
# 6) release-upload
# Upload files to GNU FTP server.
@@ -370,17 +422,17 @@ release-commit: check-tag
@echo "Tagging release $(TAG) in Git ..."
sleep 5
mv ChangeLog ChangeLog.old
- mv preview/ChangeLog preview/ChangeLog.old
+ mv ChangeLog-preview ChangeLog-preview.old
# Make sure the release ChangeLog entry is encoded with ISO-8859-1. This
# requires the `iconv' program.
echo `date "+%Y-%m-%d "`" ${COMMITTER}" | iconv -t ISO-8859-1 - >
ChangeLog
echo >> ChangeLog
echo " * Version" $(TAG) released. >> ChangeLog
echo >> ChangeLog
- cp ChangeLog preview/ChangeLog
+ cp ChangeLog ChangeLog-preview
cat ChangeLog.old >> ChangeLog
- cat preview/ChangeLog.old >> preview/ChangeLog
- git commit -m 'Release_$(TAG)' -- ChangeLog preview/ChangeLog
+ cat ChangeLog-preview.old >> ChangeLog-preview
+ git commit -m 'Release_$(TAG)' -- ChangeLog ChangeLog-preview
git tag release_`echo $(TAG) | sed -e 's/[.]/_/g'`
@echo
@echo "Congratulations! Release $(TAG) of AUCTeX is ready."
@@ -431,9 +483,24 @@ xemacs-package: check-tag
WBUILDDIR=$(PWD)/windows-package
WEMACS=/usr/src/emacs-$(WEMACSVER)/src/emacs
WPACKAGE=auctex-$(TAG)-e$(WEMACSVER)-msw.zip
-WPACKAGEFILES=site-lisp/auctex site-lisp/site-start.d site-lisp/site-start.el \
- site-lisp/tex-site.el var/auctex doc info/dir info/auctex.info* \
- info/preview-latex.info*
+# Starting from Emacs 24.4, the name of the Windows package and the tree
+# structure of the package have been changed. The following variables cater
for
+# these differences.
+ifeq ($(shell echo "$(WEMACSVER)" | grep '\(2[2-3].[1-4]\|24.[1-3]\)'
-),$(WEMACSVER))
+ WEMACSDATAROOTDIR=""
+ WEMACSEXTRACTDIR=""
+ WEMACSPACKAGE="emacs-$(WEMACSVER)-bin-i386.zip"
+ WEMACSSITELISP="site-lisp"
+else
+ WEMACSDATAROOTDIR="share/"
+ WEMACSEXTRACTDIR="emacs-$(WEMACSVER)"
+ WEMACSPACKAGE="emacs-$(WEMACSVER)-bin-i686-pc-mingw32.zip"
+ WEMACSSITELISP="$(WEMACSDATAROOTDIR)/emacs/site-lisp"
+endif
+WPACKAGEFILES=$(WEMACSSITELISP)/auctex $(WEMACSSITELISP)/site-start.d \
+ $(WEMACSSITELISP)/site-start.el $(WEMACSSITELISP)/tex-site.el \
+ var/auctex $(WEMACSDOC) $(WEMACSDATAROOTDIR)doc
$(WEMACSDATAROOTDIR)info/dir \
+ $(WEMACSDATAROOTDIR)info/auctex.info*
$(WEMACSDATAROOTDIR)info/preview-latex.info*
windows-package: check-tag
@if [ "X$(WEMACSVER)" = "X" ]; then \
echo "*** Error: No Emacs version (WEMACSVER) ***"; \
@@ -441,9 +508,9 @@ windows-package: check-tag
fi
# Make sure the prerequisites are available
test -d $(WBUILDDIR) || mkdir $(WBUILDDIR)
- test -f $(WBUILDDIR)/emacs-$(WEMACSVER)-bin-i386.zip \
+ test -f $(WBUILDDIR)/$(WEMACSPACKAGE) \
|| { cd $(WBUILDDIR) \
- && wget
http://ftp.gnu.org/gnu/emacs/windows/emacs-$(WEMACSVER)-bin-i386.zip; }
+ && wget http://ftp.gnu.org/gnu/emacs/windows/$(WEMACSPACKAGE); }
test -f $(WBUILDDIR)/auctex-$(TAG).zip \
|| { test -f $(FTPDIR)/auctex-$(TAG).zip \
&& $(CP) $(FTPDIR)/auctex-$(TAG).zip $(WBUILDDIR); } \
@@ -453,11 +520,11 @@ windows-package: check-tag
cd $(WBUILDDIR) \
&& rm -rf emacs-$(WEMACSVER) \
&& rm -rf auctex-$(TAG) \
- && unzip emacs-$(WEMACSVER)-bin-i386.zip \
+ && unzip -d "$(WEMACSEXTRACTDIR)" $(WEMACSPACKAGE) \
&& unzip auctex-$(TAG).zip
rm -f $(WPACKAGE)
# Create site-start.el and site-start.d
- cd $(WBUILDDIR)/emacs-$(WEMACSVER)/site-lisp \
+ cd $(WBUILDDIR)/emacs-$(WEMACSVER)/$(WEMACSSITELISP) \
&& echo -e ";; Load files in \`site-start.d' directory.\
\n(dolist (file (directory-files\
\n (concat (file-name-directory load-file-name) \"site-start.d\")\
@@ -468,13 +535,14 @@ windows-package: check-tag
cd $(WBUILDDIR)/auctex-$(TAG) \
&& ./configure --prefix=$(WBUILDDIR)/emacs-$(WEMACSVER) \
--without-texmf-dir --with-emacs=$(WEMACS) \
- --with-lispdir=$(WBUILDDIR)/emacs-$(WEMACSVER)/site-lisp \
- --datarootdir=$(WBUILDDIR)/emacs-$(WEMACSVER) \
+ --with-lispdir=$(WBUILDDIR)/emacs-$(WEMACSVER)/$(WEMACSSITELISP) \
+ --datarootdir=$(WBUILDDIR)/emacs-$(WEMACSVER)/$(WEMACSDATAROOTDIR) \
&& make \
&& sed -i -e 's/"\/[^\n]\+/(expand-file-name "..\/var\/auctex"
(file-name-directory load-file-name))/' tex-site.el \
&& make install
# Create the package
test -d $(FTPDIR) || mkdir -p $(FTPDIR)
+ rm -f $(FTPDIR)/$(WPACKAGE)
cd $(WBUILDDIR)/emacs-$(WEMACSVER) \
&& zip -r $(FTPDIR)/$(WPACKAGE) $(WPACKAGEFILES)
@@ -525,9 +593,11 @@ preview-ball: check-tag
mkdir $(PREVIEW_BUILD_DIR)
# Use TAG_EXPORT if set (for snapshots)
git archive $${TAG_EXPORT:=`echo release_$(TAG) | sed 's/[.]/_/g'`} \
- preview/latex | tar -xC $(PREVIEW_BUILD_DIR) --strip-components=2
- cd $(PREVIEW_BUILD_DIR) && make -f ../preview/latex/Makefile
preview.ins preview.pdf
+ latex/ | tar -xC $(PREVIEW_BUILD_DIR) --strip-components=1
+ cd $(PREVIEW_BUILD_DIR) && make -f ../latex/Makefile preview.ins
preview.pdf
chmod -R go-w+rX $(PREVIEW_BUILD_DIR)
- test -d $(FTPDIR) || mkdir -p $(FTPDIR)
- cd $(PREVIEW_BUILD_DIR) && \
- tar -cf - --owner=root --group=root README preview.dtx preview.ins
preview.pdf | gzip --best > $(FTPDIR)/preview-$(TAG).tar.gz
+ test -d $(CTANDIR) || mkdir -p $(CTANDIR)
+# CTAN requires a top level directory "preview/" for the archive.
+ cd $(PREVIEW_BUILD_DIR) && mkdir -p preview && \
+ cp README preview.dtx preview.ins preview.pdf preview/ && \
+ tar -cf - --owner=root --group=root preview/ | gzip --best >
$(CTANDIR)/preview-$(TAG).tar.gz
diff --git a/auctex.info b/auctex.info
index ab93a7d7..c5f98a87 100644
--- a/auctex.info
+++ b/auctex.info
@@ -1,6 +1,6 @@
This is auctex.info, produced by makeinfo version 5.2 from auctex.texi.
-This manual is for AUCTeX (version 11.88 from 2014-10-29), a
+This manual is for AUCTeX (version 11.88.2014-11-28 from 2014-11-28), a
sophisticated TeX environment for Emacs.
Copyright (C) 1992-1995, 2001, 2002, 2004-2014 Free Software
@@ -1276,10 +1276,10 @@ which font you want:
'C-c C-f C-d'
Delete the innermost font specification containing point.
- If you want to change font attributes of existing text, mark it as a
-region, and then invoke the commands. If no region is selected, the
-command will be inserted with empty braces, and you can start typing the
-changed text.
+ If you want to change font attributes of existing text, mark it as an
+active region, and then invoke the commands. If no region is selected,
+the command will be inserted with empty braces, and you can start typing
+the changed text.
Most of those commands will also work in math mode, but then macros
like '\mathbf' will be inserted.
@@ -3377,6 +3377,20 @@ current buffer is not its own master file.
the master file. The command is then actually run on the region
file. See above for details.
+ -- Command: LaTeX-command-section
+ ('C-c C-z') Query the user for a command, and apply it to the
+ current section (or part, chapter, subsection, paragraph, or
+ subparagraph). What makes the current section is determined by
+ 'LaTeX-command-section-level' which can be enlarged/shrunken using
+ 'LaTeX-command-section-change-level' ('C-c M-z'). The given
+ numeric prefix arg is added to the current value of
+ 'LaTeX-command-section-level'. By default,
+ 'LaTeX-command-section-level' is initialized with the current
+ document's 'LaTeX-largest-level'. The buffer contents are written
+ into the region file, after extracting the header and trailer from
+ the master file. The command is then actually run on the region
+ file. See 'TeX-command-region' for details.
+
-- User Option: TeX-region
The name of the file for temporarily storing the text when
formatting the current region.
@@ -3419,7 +3433,7 @@ File: auctex.info, Node: Selecting a Command, Next:
Processor Options, Prev:
4.1.2 Selecting and Executing a Command
---------------------------------------
-Once you started the command selection with 'C-c C-c', 'C-c C-s' or 'C-c
+Once you started the command selection with 'C-c C-c', 'C-c C-r' or 'C-c
C-b' you will be prompted for the type of command. AUCTeX will try to
guess which command is appropriate in the given situation and propose it
as default. Usually this is a processor like 'TeX' or 'LaTeX' if the
@@ -3498,7 +3512,8 @@ result. These options control if DVI or PDF output
should be produced,
if TeX should be started in interactive or nonstop mode, if source
specials or a SyncTeX file should be produced for making inverse and
forward search possible or which TeX engine should be used instead of
-regular TeX, like PDFTeX, Omega or XeTeX.
+regular TeX, like PDFTeX, Omega or XeTeX, and the style error messages
+are printed with.
-- Command: TeX-PDF-mode
('C-c C-t C-p') This command toggles the PDF mode of AUCTeX, a
@@ -3612,6 +3627,12 @@ produced.
If non-nil, the output of TeX compilation is shown in another
window.
+ You can instruct TeX to print error messages in the form
+file:line:error which is similar to the way many compilers format them.
+
+ -- User Option: TeX-file-line-error
+ If non-nil, TeX will produce file:line:error style error messages.
+
File: auctex.info, Node: Viewing, Next: Debugging, Prev: Commands, Up:
Processing
@@ -3701,6 +3722,13 @@ one of them or add your own definitions, you can do so
via the variables
can also contain placeholders as defined in 'TeX-expand-list' which
are expanded before the viewer is called.
+ The third element of each item is a string, or a list of strings,
+ with the name of the executable, or executables, needed to open the
+ output file in the viewer. Placeholders defined in
+ 'TeX-expand-list' can be used here. This element is optional and
+ is used to check whether the viewer is actually available on the
+ system.
+
A built-in viewer spec from 'TeX-view-program-list-builtin' can be
overwritten by defining a new viewer spec with the same name.
@@ -4558,8 +4586,7 @@ found in 'TeX-style-path' are loaded, and all hooks
defined in the files
will be executed.
-- User Option: TeX-style-path
- List of directories to search for AUCTeX style files. Each must
- end with a slash.
+ List of directories to search for AUCTeX style files.
By default, when AUCTeX searches a directory for files, it will
recursively search through subdirectories.
@@ -4598,8 +4625,7 @@ the variable 'TeX-auto-global' to nil.
Directories containing the site's TeX style files.
-- User Option: TeX-style-global
- Directory containing hand generated TeX information. Must end with
- a slash.
+ Directory containing hand generated TeX information.
These correspond to TeX macros shared by all users of a site.
@@ -4658,14 +4684,12 @@ document. The disadvantage is that saving will be
slower. To disable,
set 'TeX-auto-local' to nil.
-- User Option: TeX-style-local
- Directory containing hand generated TeX information. Must end with
- a slash.
+ Directory containing hand generated TeX information.
These correspond to TeX macros found in the current directory.
-- User Option: TeX-auto-local
- Directory containing automatically generated TeX information. Must
- end with a slash.
+ Directory containing automatically generated TeX information.
These correspond to TeX macros found in the current directory.
@@ -5309,8 +5333,8 @@ A.1 Copying this Manual
The copyright notice for this manual is:
- This manual is for AUCTeX (version 11.88 from 2014-10-29), a
-sophisticated TeX environment for Emacs.
+ This manual is for AUCTeX (version 11.88.2014-11-28 from 2014-11-28),
+a sophisticated TeX environment for Emacs.
Copyright (C) 1992-1995, 2001, 2002, 2004-2014 Free Software
Foundation, Inc.
@@ -5816,6 +5840,15 @@ File: auctex.info, Node: Changes, Next: Development,
Prev: Copying this Manua
A.2 Changes and New Features
============================
+News since 11.88
+================
+
+ * New option 'TeX-file-line-error' allows to select file:line:error
+ style for error messages.
+
+ * 'TeX-view-program-list' can contain, as third optional element of
+ each item, the name of the executable(s) needed to open the viewer.
+
News in 11.88
=============
@@ -6881,18 +6914,20 @@ A.4 Frequently Asked Questions
8. Why does 'TeX-next-error' ('C-c `') fail?
- When writing the log file, TeX puts information related to a file,
- including error messages, between a pair of parentheses. AUCTeX
- determines the file where the error happened by parsing the log
- file and counting the parentheses. This can fail when there are
- other, unbalanced parentheses present.
-
- As a workaround you can activate so-called file:line:error messages
- for the log file. (Those are are easier to parse, but may lack
- some details.) Either you do this in the configuration of your TeX
- system (consult its manual to see where this is) or you add a
- command line switch to the (la)tex call, e.g. by customizing
- 'LaTeX-command-style' or 'TeX-command-list'.
+ If 'TeX-file-line-error' is set to nil (not the default), these
+ sort of failures might be related to the the fact that when writing
+ the log file, TeX puts information related to a file, including
+ error messages, between a pair of parentheses. In this scenario
+ AUCTeX determines the file where the error happened by parsing the
+ log file and counting the parentheses. This can fail when there
+ are other, unbalanced parentheses present.
+
+ Activating so-called file:line:error messages for the log file
+ usually solves this issue, as these kind of messages are are easier
+ to parse; however, they may lack some details. Activation can be
+ done either in the configuration of your TeX system (consult its
+ manual to see where this is) or by simply keeping the variable
+ 'TeX-file-line-error' to the default value of non-nil.
9. What does AUC stand for?
@@ -7176,12 +7211,13 @@ Key Index
* C-c C-r: Starting a Command. (line 19)
* C-c C-s: Sectioning. (line 22)
* C-c C-t C-b: Debugging. (line 45)
-* C-c C-t C-i: Processor Options. (line 29)
-* C-c C-t C-p: Processor Options. (line 15)
-* C-c C-t C-r: Starting a Command. (line 61)
-* C-c C-t C-s: Processor Options. (line 36)
+* C-c C-t C-i: Processor Options. (line 30)
+* C-c C-t C-p: Processor Options. (line 16)
+* C-c C-t C-r: Starting a Command. (line 75)
+* C-c C-t C-s: Processor Options. (line 37)
* C-c C-t C-w: Debugging. (line 49)
* C-c C-v: Starting Viewers. (line 12)
+* C-c C-z: Starting a Command. (line 42)
* C-c <LFD>: Itemize-like. (line 10)
* C-c <LFD> <1>: Tabular-like. (line 29)
* C-c ]: Environments. (line 102)
@@ -7220,6 +7256,7 @@ Function Index
* LaTeX-arg-author: Adding Macros. (line 239)
* LaTeX-arg-usepackage: Adding Macros. (line 200)
* LaTeX-close-environment: Environments. (line 101)
+* LaTeX-command-section: Starting a Command. (line 41)
* LaTeX-declare-expert-environments: Adding Environments. (line 128)
* LaTeX-env-args: Adding Environments. (line 109)
* LaTeX-env-array: Adding Environments. (line 81)
@@ -7329,19 +7366,19 @@ Function Index
* TeX-insert-dollar: Quotes. (line 60)
* TeX-insert-macro: Completion. (line 28)
* TeX-insert-quote: Quotes. (line 14)
-* TeX-interactive-mode: Processor Options. (line 28)
+* TeX-interactive-mode: Processor Options. (line 29)
* TeX-kill-job: Control. (line 9)
* TeX-master-file-ask: Multifile. (line 68)
* TeX-narrow-to-group: Narrowing. (line 13)
* TeX-next-error: Debugging. (line 9)
* TeX-normal-mode: Parsing Files. (line 43)
-* TeX-PDF-mode: Processor Options. (line 14)
-* TeX-pin-region: Starting a Command. (line 60)
+* TeX-PDF-mode: Processor Options. (line 15)
+* TeX-pin-region: Starting a Command. (line 74)
* TeX-previous-error: Debugging. (line 24)
* TeX-read-key-val: Adding Macros. (line 243)
* TeX-recenter-output-buffer: Control. (line 13)
* TeX-save-document: Multifile. (line 96)
-* TeX-source-correlate-mode: Processor Options. (line 35)
+* TeX-source-correlate-mode: Processor Options. (line 36)
* TeX-source-correlate-mode <1>: I/O Correlation. (line 12)
* TeX-toggle-debug-bad-boxes: Debugging. (line 44)
* TeX-toggle-debug-warnings: Debugging. (line 48)
@@ -7364,9 +7401,9 @@ Variable Index
* AmS-TeX-mode-hook: Modes and Hooks. (line 21)
* ConTeXt-clean-intermediate-suffixes: Cleaning. (line 7)
* ConTeXt-clean-output-suffixes: Cleaning. (line 7)
-* ConTeXt-engine: Processor Options. (line 83)
+* ConTeXt-engine: Processor Options. (line 84)
* ConTeXt-mode-hook: Modes and Hooks. (line 21)
-* ConTeXt-Omega-engine: Processor Options. (line 83)
+* ConTeXt-Omega-engine: Processor Options. (line 84)
* docTeX-clean-intermediate-suffixes: Cleaning. (line 7)
* docTeX-clean-output-suffixes: Cleaning. (line 7)
* docTeX-mode-hook: Modes and Hooks. (line 21)
@@ -7460,7 +7497,7 @@ Variable Index
* LaTeX-biblatex-use-Biber: Selecting a Command. (line 51)
* LaTeX-clean-intermediate-suffixes: Cleaning. (line 7)
* LaTeX-clean-output-suffixes: Cleaning. (line 7)
-* LaTeX-command: Processor Options. (line 83)
+* LaTeX-command: Processor Options. (line 84)
* LaTeX-csquotes-close-quote: Quotes. (line 43)
* LaTeX-csquotes-open-quote: Quotes. (line 43)
* LaTeX-csquotes-quote-after-quote: Quotes. (line 43)
@@ -7501,7 +7538,7 @@ Variable Index
* LaTeX-math-list: Mathematics. (line 36)
* LaTeX-math-menu-unicode: Mathematics. (line 54)
* LaTeX-mode-hook: Modes and Hooks. (line 21)
-* LaTeX-Omega-command: Processor Options. (line 83)
+* LaTeX-Omega-command: Processor Options. (line 84)
* LaTeX-paragraph-commands: Filling. (line 55)
* LaTeX-section-hook: Sectioning. (line 40)
* LaTeX-section-hook <1>: Sectioning. (line 48)
@@ -7531,8 +7568,8 @@ Variable Index
* TeX-auto-cleanup-hook: Hacking the Parser. (line 100)
* TeX-auto-empty-regexp-list: Parsing Files. (line 93)
* TeX-auto-full-regexp-list: Parsing Files. (line 126)
-* TeX-auto-global: Automatic Global. (line 25)
-* TeX-auto-local: Automatic Local. (line 22)
+* TeX-auto-global: Automatic Global. (line 24)
+* TeX-auto-local: Automatic Local. (line 21)
* TeX-auto-parse-length: Parsing Files. (line 87)
* TeX-auto-prepare-hook: Hacking the Parser. (line 97)
* TeX-auto-private: Automatic Private. (line 19)
@@ -7544,9 +7581,9 @@ Variable Index
* TeX-check-path: Selecting a Command. (line 67)
* TeX-clean-confirm: Cleaning. (line 26)
* TeX-close-quote: Quotes. (line 25)
-* TeX-command: Processor Options. (line 83)
+* TeX-command: Processor Options. (line 84)
* TeX-command-default: Selecting a Command. (line 42)
-* TeX-command-extra-options: Processor Options. (line 109)
+* TeX-command-extra-options: Processor Options. (line 110)
* TeX-command-list: Starting a Command. (line 16)
* TeX-command-list <1>: Starting a Command. (line 32)
* TeX-command-list <2>: Selecting a Command. (line 14)
@@ -7557,19 +7594,20 @@ Variable Index
* TeX-default-mode: Japanese. (line 6)
* TeX-default-mode <1>: Japanese. (line 21)
* TeX-display-help: Debugging. (line 56)
-* TeX-DVI-via-PDFTeX: Processor Options. (line 21)
+* TeX-DVI-via-PDFTeX: Processor Options. (line 22)
* TeX-electric-escape: Completion. (line 58)
* TeX-electric-math: Quotes. (line 72)
* TeX-electric-sub-and-superscript: Mathematics. (line 68)
-* TeX-engine: Processor Options. (line 66)
-* TeX-engine-alist: Processor Options. (line 83)
-* TeX-engine-alist <1>: Processor Options. (line 94)
-* TeX-engine-alist-builtin: Processor Options. (line 83)
+* TeX-engine: Processor Options. (line 67)
+* TeX-engine-alist: Processor Options. (line 84)
+* TeX-engine-alist <1>: Processor Options. (line 95)
+* TeX-engine-alist-builtin: Processor Options. (line 84)
* TeX-error-overview-frame-parameters: Debugging. (line 97)
* TeX-error-overview-open-after-TeX-run: Debugging. (line 79)
* TeX-error-overview-setup: Debugging. (line 88)
* TeX-expand-list: Selecting a Command. (line 14)
-* TeX-file-recurse: Automatic. (line 45)
+* TeX-file-line-error: Processor Options. (line 130)
+* TeX-file-recurse: Automatic. (line 44)
* TeX-fold-auto: Folding. (line 71)
* TeX-fold-command-prefix: Folding. (line 146)
* TeX-fold-env-spec-list: Folding. (line 188)
@@ -7585,13 +7623,13 @@ Variable Index
* TeX-fold-unspec-use-name: Folding. (line 212)
* TeX-font-list: Font Specifiers. (line 48)
* TeX-header-end: Starting a Command. (line 32)
-* TeX-header-end <1>: Starting a Command. (line 45)
-* TeX-ignore-file: Automatic. (line 53)
+* TeX-header-end <1>: Starting a Command. (line 59)
+* TeX-ignore-file: Automatic. (line 52)
* TeX-insert-braces: Completion. (line 76)
* TeX-insert-braces-alist: Completion. (line 79)
* TeX-insert-macro-default-style: Completion. (line 36)
* TeX-install-font-lock: Font Locking. (line 13)
-* TeX-interactive-mode: Processor Options. (line 29)
+* TeX-interactive-mode: Processor Options. (line 30)
* TeX-language-bg-hook: European. (line 53)
* TeX-language-cz-hook: European. (line 53)
* TeX-language-de-hook: European. (line 53)
@@ -7611,23 +7649,23 @@ Variable Index
* TeX-master <2>: Multifile. (line 40)
* TeX-newline-function: Indenting. (line 29)
* TeX-newline-function <1>: Indenting. (line 110)
-* TeX-Omega-command: Processor Options. (line 83)
+* TeX-Omega-command: Processor Options. (line 84)
* TeX-one-master: Multifile. (line 55)
* TeX-open-quote: Quotes. (line 21)
* TeX-outline-extra: Outline. (line 13)
-* TeX-output-view-style: Starting Viewers. (line 97)
+* TeX-output-view-style: Starting Viewers. (line 104)
* TeX-parse-all-errors: Debugging. (line 33)
* TeX-parse-self: Parsing Files. (line 37)
-* TeX-PDF-mode: Processor Options. (line 15)
+* TeX-PDF-mode: Processor Options. (line 16)
* TeX-quote-after-quote: Quotes. (line 29)
* TeX-quote-language-alist: European. (line 126)
* TeX-region: Starting a Command. (line 32)
-* TeX-region <1>: Starting a Command. (line 41)
+* TeX-region <1>: Starting a Command. (line 55)
* TeX-save-query: Multifile. (line 100)
-* TeX-show-compilation: Processor Options. (line 122)
-* TeX-source-correlate-method: Processor Options. (line 47)
+* TeX-show-compilation: Processor Options. (line 123)
+* TeX-source-correlate-method: Processor Options. (line 48)
* TeX-source-correlate-method <1>: I/O Correlation. (line 21)
-* TeX-source-correlate-mode: Processor Options. (line 36)
+* TeX-source-correlate-mode: Processor Options. (line 37)
* TeX-source-correlate-start-server: I/O Correlation. (line 48)
* TeX-source-correlate-start-server <1>: I/O Correlation. (line 54)
* TeX-style-global: Automatic Global. (line 19)
@@ -7635,11 +7673,11 @@ Variable Index
* TeX-style-path: Automatic. (line 38)
* TeX-style-private: Automatic Private. (line 28)
* TeX-trailer-start: Starting a Command. (line 32)
-* TeX-trailer-start <1>: Starting a Command. (line 50)
+* TeX-trailer-start <1>: Starting a Command. (line 64)
* TeX-view-predicate-list: Starting Viewers. (line 56)
* TeX-view-program-list: Starting Viewers. (line 65)
* TeX-view-program-selection: Starting Viewers. (line 36)
-* TeX-view-style: Starting Viewers. (line 106)
+* TeX-view-style: Starting Viewers. (line 113)
* Texinfo-clean-intermediate-suffixes: Cleaning. (line 7)
* Texinfo-clean-output-suffixes: Cleaning. (line 7)
* Texinfo-mode-hook: Modes and Hooks. (line 21)
@@ -7703,7 +7741,7 @@ Concept Index
(line 6)
* ASCII pTeX <1>: Japanese. (line 6)
* 'auctex.el': Loading the package. (line 14)
-* 'auctex.el' <1>: Changes. (line 274)
+* 'auctex.el' <1>: Changes. (line 283)
* 'auto' directories.: Automatic. (line 6)
* Auto-Reveal: Folding. (line 6)
* Automatic: Automatic. (line 6)
@@ -7820,7 +7858,7 @@ Concept Index
* Hide Macros: Folding. (line 6)
* HLaTeX: Internationalization.
(line 6)
-* I/O correlation: Processor Options. (line 35)
+* I/O correlation: Processor Options. (line 36)
* I/O correlation <1>: I/O Correlation. (line 6)
* Including: Multifile. (line 6)
* Indentation: Indenting. (line 6)
@@ -7912,8 +7950,8 @@ Concept Index
* Parsing TeX output: Debugging. (line 6)
* 'PATH' in Windows: Installation under MS Windows.
(line 51)
-* PDF mode: Processor Options. (line 15)
-* PDFSync: Processor Options. (line 35)
+* PDF mode: Processor Options. (line 16)
+* PDFSync: Processor Options. (line 36)
* PDFSync <1>: I/O Correlation. (line 6)
* Personal customization: Customizing. (line 6)
* Personal information: Automatic Private. (line 6)
@@ -7971,7 +8009,7 @@ Concept Index
* Site macro directory: Automatic Global. (line 6)
* Site TeX macro directory: Automatic Global. (line 6)
* Slovak: European. (line 53)
-* Source specials: Processor Options. (line 35)
+* Source specials: Processor Options. (line 36)
* Source specials <1>: I/O Correlation. (line 6)
* Specifying a font: Font Specifiers. (line 6)
* Starting a previewer: Viewing. (line 6)
@@ -7988,7 +8026,7 @@ Concept Index
(line 6)
* Swedish: European. (line 53)
* Symbols: Mathematics. (line 6)
-* SyncTeX: Processor Options. (line 35)
+* SyncTeX: Processor Options. (line 36)
* SyncTeX <1>: I/O Correlation. (line 6)
* Syntax Highlighting: Font Locking. (line 6)
* Tabify: Parsing Files. (line 6)
@@ -8002,7 +8040,7 @@ Concept Index
(line 286)
* 'tex-site.el': Loading the package. (line 14)
* 'tex-site.el' <1>: Customizing. (line 6)
-* 'tex-site.el' <2>: Changes. (line 274)
+* 'tex-site.el' <2>: Changes. (line 283)
* tool bar, toolbar: Processing. (line 11)
* Trailer: Commands. (line 6)
* Underfull boxes: Debugging. (line 6)
@@ -8020,100 +8058,100 @@ Concept Index
Tag Table:
-Node: Top916
-Node: Copying7178
-Node: Introduction9134
-Node: Summary9404
-Node: Installation12145
-Node: Prerequisites13519
-Node: Configure16387
-Node: Build/install21798
-Node: Loading the package22289
-Node: Advice for package providers24096
-Node: Advice for non-privileged users28041
-Node: Installation under MS Windows31999
-Node: Customizing47222
-Node: Quick Start48805
-Ref: Quick Start-Footnote-150795
-Node: Editing Facilities50942
-Node: Processing Facilities55737
-Node: Editing59631
-Node: Quotes60961
-Node: Font Specifiers69229
-Node: Sectioning71055
-Node: Environments75375
-Node: Equations80529
-Node: Floats81120
-Node: Itemize-like82653
-Node: Tabular-like83374
-Node: Customizing Environments84857
-Node: Mathematics85097
-Node: Completion88023
-Node: Marking93346
-Node: Marking (LaTeX)93970
-Node: Marking (Texinfo)94912
-Node: Commenting96522
-Node: Indenting97847
-Node: Filling103632
-Node: Display108952
-Node: Font Locking110564
-Node: Fontification of macros112639
-Node: Fontification of quotes122077
-Node: Fontification of math123572
-Node: Verbatim content125291
-Node: Faces126065
-Node: Known problems126554
-Node: Folding127483
-Node: Outline138307
-Node: Narrowing139579
-Node: Processing140629
-Node: Commands141792
-Node: Starting a Command142348
-Node: Selecting a Command146071
-Node: Processor Options149597
-Node: Viewing156049
-Node: Starting Viewers156423
-Node: I/O Correlation162585
-Node: Debugging166031
-Node: Checking170386
-Node: Control171548
-Node: Cleaning172275
-Node: Documentation173488
-Node: Customization174268
-Node: Modes and Hooks174761
-Node: Multifile175967
-Node: Parsing Files180646
-Node: Internationalization185558
-Node: European186739
-Node: Japanese193619
-Node: Automatic195316
-Node: Automatic Global197841
-Node: Automatic Private199002
-Node: Automatic Local200315
-Node: Style Files201404
-Node: Simple Style202197
-Node: Adding Macros205470
-Node: Adding Environments214591
-Node: Adding Other219252
-Node: Hacking the Parser219839
-Node: Appendices223708
-Node: Copying this Manual224092
-Node: GNU Free Documentation License224974
-Node: Changes250093
-Node: Development278741
-Node: Mid-term Goals279387
-Node: Wishlist280604
-Node: Bugs286561
-Node: FAQ288091
-Node: Texinfo mode294107
-Node: Exploiting295243
-Node: Superseding296063
-Node: Mapping300267
-Node: Unbinding302096
-Node: Indices302917
-Node: Key Index303142
-Node: Function Index309101
-Node: Variable Index319473
-Node: Concept Index340004
+Node: Top927
+Node: Copying7189
+Node: Introduction9145
+Node: Summary9415
+Node: Installation12156
+Node: Prerequisites13530
+Node: Configure16398
+Node: Build/install21809
+Node: Loading the package22300
+Node: Advice for package providers24107
+Node: Advice for non-privileged users28052
+Node: Installation under MS Windows32010
+Node: Customizing47233
+Node: Quick Start48816
+Ref: Quick Start-Footnote-150806
+Node: Editing Facilities50953
+Node: Processing Facilities55756
+Node: Editing59650
+Node: Quotes60980
+Node: Font Specifiers69248
+Node: Sectioning71074
+Node: Environments75394
+Node: Equations80548
+Node: Floats81139
+Node: Itemize-like82672
+Node: Tabular-like83393
+Node: Customizing Environments84876
+Node: Mathematics85116
+Node: Completion88042
+Node: Marking93365
+Node: Marking (LaTeX)93989
+Node: Marking (Texinfo)94931
+Node: Commenting96541
+Node: Indenting97866
+Node: Filling103651
+Node: Display108971
+Node: Font Locking110583
+Node: Fontification of macros112658
+Node: Fontification of quotes122096
+Node: Fontification of math123591
+Node: Verbatim content125310
+Node: Faces126084
+Node: Known problems126573
+Node: Folding127502
+Node: Outline138326
+Node: Narrowing139598
+Node: Processing140648
+Node: Commands141811
+Node: Starting a Command142367
+Node: Selecting a Command146903
+Node: Processor Options150429
+Node: Viewing157171
+Node: Starting Viewers157545
+Node: I/O Correlation164063
+Node: Debugging167509
+Node: Checking171864
+Node: Control173026
+Node: Cleaning173753
+Node: Documentation174966
+Node: Customization175746
+Node: Modes and Hooks176239
+Node: Multifile177445
+Node: Parsing Files182124
+Node: Internationalization187036
+Node: European188217
+Node: Japanese195097
+Node: Automatic196794
+Node: Automatic Global199285
+Node: Automatic Private200417
+Node: Automatic Local201730
+Node: Style Files202761
+Node: Simple Style203554
+Node: Adding Macros206827
+Node: Adding Environments215948
+Node: Adding Other220609
+Node: Hacking the Parser221196
+Node: Appendices225065
+Node: Copying this Manual225449
+Node: GNU Free Documentation License226342
+Node: Changes251461
+Node: Development280392
+Node: Mid-term Goals281038
+Node: Wishlist282255
+Node: Bugs288212
+Node: FAQ289742
+Node: Texinfo mode295915
+Node: Exploiting297051
+Node: Superseding297871
+Node: Mapping302075
+Node: Unbinding303904
+Node: Indices304725
+Node: Key Index304950
+Node: Function Index310982
+Node: Variable Index321427
+Node: Concept Index342031
End Tag Table
diff --git a/auto-preview.el.in b/auto.el.in
similarity index 100%
rename from auto-preview.el.in
rename to auto.el.in
diff --git a/autogen.sh b/autogen.sh
index 99c32a75..c61b5345 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -29,10 +29,7 @@ test "x${PDFTEX}" != x || PDFTEX=pdftex
test "x${PERL}" != x || PERL=perl
test "x${MAKE}" != x || MAKE=make
${AUTOCONF} || { echo "Error running ${AUTOCONF} in ." >&2 ; exit 1; }
-cd preview
-${AUTOCONF} -I.. || { echo "Error running ${AUTOCONF} in preview" >&2 ; exit
1; }
-cd ..
-rm -rf autom4te.cache preview/autom4te.cache
+rm -rf autom4te.cache
if test "x${AUCTEXDATE}" = x
then
AUCTEXDATE=`LC_ALL=C sed -n '1s/^\([-0-9][-0-9]*\).*/\1/p' ChangeLog`
diff --git a/bib-cite.el b/bib-cite.el
index 47151dd2..9ecbc81c 100644
--- a/bib-cite.el
+++ b/bib-cite.el
@@ -724,9 +724,6 @@ These are usually month abbreviations (or journals) defined
in a style file."
"*Regular expression for \\ref LaTeX commands that have a matching \\label.
A opening curly bracket is appended to the regexp.")
-(defvar bib-cite-is-XEmacs
- (not (null (save-match-data (string-match "XEmacs\\|Lucid" emacs-version)))))
-
(defvar bib-cite-minor-mode nil)
(defvar bib-highlight-mouse-keymap (make-sparse-keymap)
@@ -762,11 +759,11 @@ runs bib-find, and [mouse-3] runs bib-display."
(progn
(bib-cite-setup-highlight-mouse-keymap)
(bib-highlight-mouse)
- (when bib-cite-is-XEmacs
+ (when (featurep 'xemacs)
(make-local-hook 'after-change-functions))
(add-hook 'after-change-functions
'bib-cite-setup-mouse-function nil t)))
- (if bib-cite-is-XEmacs
+ (if (featurep 'xemacs)
(progn
(or (local-variable-p 'current-menubar (current-buffer))
(set-buffer-menubar current-menubar))
@@ -775,7 +772,7 @@ runs bib-find, and [mouse-3] runs bib-display."
;;;Undo the minor-mode
;; mouse overlay
(cond
- (bib-cite-is-XEmacs
+ ((featurep 'xemacs)
(while bib-ext-list
(delete-extent (car bib-ext-list))
(setq bib-ext-list (cdr bib-ext-list))))
@@ -786,7 +783,7 @@ runs bib-find, and [mouse-3] runs bib-display."
;; FIXME Hope no other package is using them in this buffer!
(remove-text-properties (point-min) (point-max)
'(mouse-face t local-map t)))))
- (if bib-cite-is-XEmacs
+ (if (featurep 'xemacs)
(delete-menu-item '("BCite"))))))
;;This must be eval'ed when the LaTeX mode is in use.
@@ -803,7 +800,7 @@ runs bib-find, and [mouse-3] runs bib-display."
;;; display the bib-cite stuff (or a subset of it).
(let ((m (copy-keymap (current-local-map))))
(cond
- (bib-cite-is-XEmacs
+ ((featurep 'xemacs)
(set-keymap-name m 'bib-highlight-mouse-keymap)
(cond
;;action-key stuff from Vladimir Alexiev <vladimir@cs.ualberta.ca>
@@ -849,7 +846,7 @@ runs bib-find, and [mouse-3] runs bib-display."
"Unconditionally turn on Bib Cite mode."
(bib-cite-minor-mode 1))
-(defun bib-cite-setup-mouse-function (beg end old-len)
+(defun bib-cite-setup-mouse-function (beg end _old-len)
(save-excursion
(save-match-data
(save-restriction
@@ -893,7 +890,7 @@ runs bib-find, and [mouse-3] runs bib-display."
;;; Add a menu entry to bibtex.el (Perhaps I should not do this).
(cond
- ((and (string-match "XEmacs\\|Lucid" emacs-version)
+ ((and (featurep 'xemacs)
(or window-system
(fboundp 'smart-menu))) ;text menus by Bob Weiner
;;
@@ -927,7 +924,7 @@ runs bib-find, and [mouse-3] runs bib-display."
(add-hook 'bibtex-mode-hook 'bib-cite-bibtex-mode-hook))
)
- ((and (not (string-match "XEmacs\\|Lucid" emacs-version))
+ ((and (not (featurep 'xemacs))
(string-equal "19" (substring emacs-version 0 2))
(or window-system
(fboundp 'tmm-menubar))) ; 19.30 - Will autoload if necessary
@@ -1160,7 +1157,7 @@ by using bib-apropos sequentially."
(if (not the-text)
(message "Sorry, no matches found.")
(with-output-to-temp-buffer "*Help*"
- (mapcar 'princ (nreverse the-text)))
+ (mapc #'princ (nreverse the-text)))
(bib-cite-fontify-help-as-bibtex)
(if bib-novice
(message
@@ -1236,18 +1233,19 @@ to create a bibtex file containing only the references
used in the document."
(put-text-property (point-min)(or limit (point-max))
'face 'red-bold))))
-(defun bib-cite-fontify-help-xemacs (defaults)
- (if (fboundp 'font-lock-set-defaults-1) ; >= XEmcas 19.14
- (progn
- (set-buffer "*Help*")
- (setq font-lock-defaults-computed nil
- font-lock-keywords nil)
- (font-lock-set-defaults-1
- (and defaults (font-lock-find-font-lock-defaults defaults)))
- (font-lock-fontify-buffer)
- (setq font-lock-defaults-computed nil
- font-lock-keywords nil)
- (font-lock-set-defaults-1))))
+(when (featurep 'xemacs)
+ (defun bib-cite-fontify-help-xemacs (defaults)
+ (if (fboundp 'font-lock-set-defaults-1) ; >= XEmacs 19.14
+ (progn
+ (set-buffer "*Help*")
+ (setq font-lock-defaults-computed nil
+ font-lock-keywords nil)
+ (font-lock-set-defaults-1
+ (and defaults (font-lock-find-font-lock-defaults defaults)))
+ (font-lock-fontify-buffer)
+ (setq font-lock-defaults-computed nil
+ font-lock-keywords nil)
+ (font-lock-set-defaults-1)))))
(defun bib-cite-fontify-help-as-bibtex ()
(save-excursion
@@ -1255,7 +1253,7 @@ to create a bibtex file containing only the references
used in the document."
((not (featurep 'font-lock))
nil) ;No font-lock! Stop here.
;; font-lock under Emacs and XEmacs
- ((string-match "XEmacs\\|Lucid" emacs-version)
+ ((featurep 'xemacs)
;; XEmacs
(bib-cite-fontify-help-xemacs 'bibtex-mode))
(t
@@ -1264,9 +1262,10 @@ to create a bibtex file containing only the references
used in the document."
(let ((font-lock-defaults
'(bib-cite-bibtex-font-lock-keywords
nil t ((?$ . "\"")(?\" . ".")))))
- (if font-lock-mode
- (font-lock-mode)
- (if (fboundp 'font-lock-unset-defaults) (font-lock-unset-defaults))
+ (if (not font-lock-mode)
+ (font-lock-mode 1)
+ (if (fboundp 'font-lock-unset-defaults)
+ (font-lock-unset-defaults))
(font-lock-unfontify-buffer))
(font-lock-fontify-buffer))))))
@@ -1276,7 +1275,7 @@ to create a bibtex file containing only the references
used in the document."
((not (featurep 'font-lock))
nil) ;No font-lock! Stop here.
;; font-lock under Emacs and XEmacs
- ((string-match "XEmacs\\|Lucid" emacs-version)
+ ((featurep 'xemacs)
;; XEmacs, not necessary to do s.th. special for font-latex, we do *not*
;; want the buffer-local faces!
(bib-cite-fontify-help-xemacs 'latex-mode))
@@ -1298,9 +1297,10 @@ to create a bibtex file containing only the references
used in the document."
(font-lock-comment-start-regexp . "%")
(font-lock-mark-block-function . mark-paragraph))
'(tex-font-lock-keywords nil nil ((?$ . "\""))))))
- (if font-lock-mode
- (font-lock-mode)
- (if (fboundp 'font-lock-unset-defaults) (font-lock-unset-defaults))
+ (if (not font-lock-mode)
+ (font-lock-mode 1)
+ (if (fboundp 'font-lock-unset-defaults)
+ (font-lock-unset-defaults))
(font-lock-unfontify-buffer))
(font-lock-fontify-buffer))))))
@@ -1347,7 +1347,7 @@ See variables bib-etags-command and bib-etags-filename"
;; tags-file-name set.
;; To get around this. I'm setting this variable in the TAGS buffer.
;; Skip this in XEmacs (Changed by Anders Stenman)
- (if (and (not (string-match "XEmacs\\|Lucid" emacs-version))
+ (if (and (not (featurep 'xemacs))
(get-file-buffer the-tags-file))
(with-current-buffer (get-file-buffer the-tags-file)
(set (make-local-variable 'tags-file-name) the-tags-file))))
@@ -1390,7 +1390,7 @@ See variables bib-etags-command and bib-etags-filename"
;; * peta Wed Nov 8 16:27:29 1995 -- better remove the mouse face
;; properties first.
(setq bib-ext-list nil) ;Reconstructed below...
- (if (string-match "XEmacs\\|Lucid" emacs-version)
+ (if (featurep 'xemacs)
(while local-extent-list
(setq extent (car local-extent-list))
(if (or (extent-detached-p extent)
@@ -1415,7 +1415,7 @@ See variables bib-etags-command and bib-etags-filename"
(setq s (match-beginning 0))
(setq e (match-end 0))
(cond
- ((string-match "XEmacs\\|Lucid" emacs-version)
+ ((featurep 'xemacs)
(setq extent (make-extent s e))
(setq bib-ext-list (cons extent bib-ext-list))
(set-extent-property extent 'highlight t)
@@ -1448,7 +1448,7 @@ See variables bib-etags-command and bib-etags-filename"
(let ((modified (buffer-modified-p))
(inhibit-read-only t))
(cond
- ((string-match "XEmacs\\|Lucid" emacs-version)
+ ((featurep 'xemacs)
(while bib-ext-list
(delete-extent (car bib-ext-list))
(setq bib-ext-list (cdr bib-ext-list))))
@@ -1726,7 +1726,7 @@ If within a multi-file document (in auctex only)
(if (looking-at "\n") ;Remove first empty line...
(delete-char 1))
(with-output-to-temp-buffer "*Help*"
- (princ (buffer-substring 1 (point-max))))
+ (princ (buffer-substring (point-min) (point-max))))
(bib-cite-fontify-help-as-latex)
(kill-buffer "*BiBTemp*"))
(t
@@ -2307,7 +2307,7 @@ Makes sure TAGS file exists, etc."
;; find-tag-noselect should set the TAGS file for the new buffer
;; that's what C-h f visit-tags-table says...
(cond
- ((string-match "XEmacs\\|Lucid" emacs-version)
+ ((featurep 'xemacs)
(find-tag tag)
(setq new-buffer (current-buffer))
(set-buffer the-buffer))
@@ -2420,6 +2420,10 @@ although BiBTeX doesn't allow it!"
(setq doNext nil)))
(mapcar 'list the-list)))))
+(defvar TeX-auto-save)
+(defvar TeX-auto-update)
+(defvar TeX-auto-regexp-list)
+
;; BibTeX-mode key def to create AUCTeX's parsing file.
(defun bib-create-auto-file ()
"Force the creation of the AUCTeX auto file for a bibtex buffer."
@@ -2427,8 +2431,8 @@ although BiBTeX doesn't allow it!"
(if (not (require 'latex))
(error "Sorry, This is only useful if you have AUCTeX"))
(let ((TeX-auto-save t)
- (TeX-auto-update t)
- (TeX-auto-regexp-list BibTeX-auto-regexp-list))
+ (TeX-auto-update t)
+ (TeX-auto-regexp-list BibTeX-auto-regexp-list))
;; TeX-auto-write
;; -> calls TeX-auto-store
;; -> calls TeX-auto-parse
diff --git a/configure-preview.ac b/configure-preview.ac
deleted file mode 100644
index 6c400055..00000000
--- a/configure-preview.ac
+++ /dev/null
@@ -1,226 +0,0 @@
-dnl Autoconf script for AUCTeX
-
-dnl Maintainer: auctex-devel@gnu.org
-
-dnl Copyright (C) 2001, 2002, 2003, 2004, 2005,
-dnl 2006 Free Software Foundation, Inc.
-
-dnl This file is part of AUCTeX.
-
-dnl AUCTeX is free software; you can redistribute it and/or modify it
-dnl under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-
-dnl AUCTeX is distributed in the hope that it will be useful, but
-dnl WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl General Public License for more details.
-
-dnl You should have received a copy of the GNU General Public License
-dnl along with AUCTeX; see the file COPYING. If not, write to the Free
-dnl Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-dnl MA 02110-1301, USA.
-
-AC_INIT(preview-latex,11.84,bug-auctex@gnu.org)
-
-AC_PROG_MAKE_SET
-AC_PROG_INSTALL
-
-# Import unquoted variables.
-TEX="$TEX_UNQUOTED"
-packagedir="$packagedir_unquoted"
-packagelispdir="$packagelispdir_unquoted"
-packagedatadir="$packagedatadir_unquoted"
-EMACS="$EMACS_UNQUOTED"
-
-EMACS_PROG_EMACS
-
-if test ${EMACS_FLAVOR} = xemacs
-then
- EMACS_CHECK_VERSION(21,4)
-else
- EMACS_CHECK_VERSION(21,1)
-fi
-
-# The Debian package uses `--disable-build-dir-test'; normal users should
-# never need to modify the default behavior.
-AC_ARG_ENABLE([build-dir-test],
- [ --enable-build-dir-test test for build directory inside `load-path'
- (on by default)],
- [if ! [[ "X-${enableval}" = "X-no" ]]
- then VALID_BUILD_DIR
- fi],
- [VALID_BUILD_DIR])
-
-if test ${EMACS_FLAVOR} = "xemacs" ; then
- PLAT_LISP=prv-xemacs.el
- EMACS_PATH_PACKAGEDIR([preview],[preview])
-else
- PLAT_LISP=prv-emacs.el
- packagedir=no
-fi
-
-if test "X${packagedir}" = Xno
-then
- EMACS_PATH_LISPDIR
- AC_MSG_CHECKING(what file to use for preview startup)
- AC_ARG_WITH(previewstartfile,
- [[ --with-previewstartfile=FILE What file to use for preview startup.]],
- [[ previewstartfile="${withval}" ]],
- [ _tmpdir_="${lispdir}"
- AC_FULL_EXPAND(_tmpdir_)
- if test -d "${_tmpdir_}/site-start.d"
- then
- previewstartfile="${lispdir}/site-start.d/preview-latex.el"
- else
- previewstartfile="${lispdir}/preview-latex.el"
- fi])
- AC_MSG_RESULT([[${previewstartfile}]])
- test "X$packagelispdir" = X && packagelispdir="${lispdir}/preview"
- test "X$packagedatadir" = X && packagedatadir="${packagelispdir}"
-else
- #lispdir is only used for determining relative files.
- lispdir="${packagedir}"
- test "X$packagelispdir" = X && packagelispdir="${packagedir}/lisp/preview"
- previewstartfile="${packagelispdir}"/auto-autoloads.el
- test "X$packagedatadir" = X && packagedatadir="${packagedir}/etc/preview"
-fi
-
-AC_SUBST(previewstartfile)
-
-AC_MSG_CHECKING([where the package lisp files go])
-AC_ARG_WITH(packagelispdir,
-[[ --with-packagelispdir=DIR
- Directory for the package lisp files.]],
- [packagelispdir=["${withval}"]])
-AC_LISPIFY_DIR(packagelispdir,"${previewstartfile}")
-AC_MSG_RESULT([[${packagelispdir}]])
-
-AC_MSG_CHECKING([where the data files go])
-AC_ARG_WITH(packagedatadir,
-[[ --with-packagedatadir=DIR Where the data files go.]],
- [packagedatadir=["${withval}"]])
-AC_LISPIFY_DIR(packagedatadir,"${previewstartfile}")
-AC_MSG_RESULT([[${packagedatadir}]])
-
-AC_SUBST(PLAT_LISP)
-AC_SUBST(packagedir)
-
-EMACS_CHECK_AUCTEX
-AC_SUBST(auctexdir)
-
-AC_ARG_VAR(GS,[Ghostscript executable for batch operation])
-AC_CHECK_PROGS(GS, gs GSWIN32C.EXE, NONE)
-
-EMACS_LISP([[lispGS]],[[(if (member dir (list \"NONE\" (if (eq system-type
'windows-nt) \"GSWIN32C.EXE\" \"gs\"))) \"\" \`(defvar preview-gs-command
,dir))]],-no-site-file,[[dir]],[["${GS}"]])
-AC_SUBST(lispGS)
-
-dnl check to see if GS supports -dTextAlphaBits and -dGraphicsAlphaBits
-dnl Check to see if specific drivers are built in.
-dnl Need table of mappings, with priority
-
-AC_PATH_PROG_REQUIRED(LATEX, latex, [LaTeX not found, aborting!
-You must install LaTeX for preview to work.])
-
-AC_PATH_PROG(PDFLATEX, pdflatex)
-
-# Determine which latex-style components to install
-# To match .sty, .def, .cfg, but _not_ .drv
-TEXMFGEN=[`sed -n
's/^%<installer>.*file[{]\\([^}.]*\\.[sdc][tef][yfg]\\)[}].*/\\1/p'
latex/preview.dtx`]
-# Replace newlines with spaces.
-TEXMFGEN="`echo ${TEXMFGEN}`"
-AC_SUBST(TEXMFGEN)
-
-AC_PATH_PROG_REQUIRED(TEX, tex, NONE)
-
-TEX_PATH_TEXMFDIR
-
-if test "x${texmfdir}" = "xno"
-then
- packagetexstyles="${packagedatadir}/latex"
- AC_LISPIFY_DIR(packagetexstyles,"${previewstartfile}")
- lisppackagetexstyles="(defvar preview-TeX-style-dir ${lisppackagetexstyles})"
- test "X${TEXHASH}" = X && TEXHASH=:
-else
- lisppackagetexstyles=
-fi
-AC_SUBST(lisppackagetexstyles)
-
-# Be very careful about assuming things about the available hash programs
-# MiKTeX comes with a braindead link to mktexlsr, apparently, so first
-# try the regular utility from them.
-AC_ARG_VAR(TEXHASH,[command to update the TeX filename database.
-Set to : to skip updating the database on installation.
-This is the default for --without-texmf-dir])
-
-if test "X${TEXHASH}" = "X"
-then
- AC_PATH_PROG(TEXHASH, texhash)
- AC_CHECK_PROG(TEXHASH, initexmf, initexmf -u)
- if test "X${TEXHASH}" = X
- then
- AC_PATH_PROGS(TEXHASH, mktexlsr MakeTeXls-R, :)
- fi
-fi
-
-AC_MSG_CHECKING([[for glaring installation conflicts]])
-exppackagelispdir="$packagelispdir"
-AC_FULL_EXPAND(exppackagelispdir)
-exppreviewstartfile="$previewstartfile"
-AC_FULL_EXPAND(exppreviewstartfile)
-
-EMACS_LISP(shadows,[[
- (concat
- (and (setq tmp (locate-library \"preview.elc\"))
- (not (string= (file-truename tmp)
- (file-truename (expand-file-name \"preview.elc\"
- packagelispdir))))
- (format \"Conflicting previous installation in \`%s' found!\n\"
- (file-name-directory tmp)))
- (and (setq tmp (locate-library \"preview-latex.el\"))
- (not (string= (file-truename tmp)
- (file-truename previewstartfile)))
- (format \"Conflicting previous startup file \`%s' found!\n\"
tmp)))]],,
- [[packagelispdir previewstartfile]],[["${exppackagelispdir}"
"${exppreviewstartfile}"]])
-if test "NONE${shadows}" != NONE
-then
- conflictsmsg="Conflicts with previous installations have been detected.
-Please fix them before continuing.
-"
- AC_MSG_RESULT([[ouch!
-]])
-AC_MSG_WARN([[${shadows}
-]])
-else
- conflictsmsg=
- AC_MSG_RESULT([[probably none]])
-fi
-
-
-AC_SHELL_QUOTIFY(texmfdir)
-AC_SHELL_QUOTIFY(prefix)
-AC_SHELL_QUOTIFY(exec_prefix)
-AC_SHELL_QUOTIFY(libdir)
-AC_SHELL_QUOTIFY(previewtexmfdir)
-AC_SHELL_QUOTIFY(previewdocdir)
-AC_SHELL_QUOTIFY(packagedir)
-AC_SHELL_QUOTIFY(packagelispdir)
-AC_SHELL_QUOTIFY(previewstartfile)
-AC_SHELL_QUOTIFY(lispdir)
-AC_SHELL_QUOTIFY(packagedatadir)
-AC_SHELL_QUOTIFY(auctexdir)
-AC_SHELL_QUOTIFY(datadir)
-AC_SHELL_QUOTIFY(GS)
-AC_SHELL_QUOTIFY(TEXHASH)
-AC_SHELL_QUOTIFY(EMACS)
-AC_SHELL_QUOTIFY(TEX)
-AC_SHELL_QUOTIFY(LATEX)
-AC_SHELL_QUOTIFY(PDFLATEX)
-
-AC_OUTPUT(Makefile auto.el latex/Makefile)
-cat >&2 <<EOF
-
-Congratulations! Configuration of preview is complete.
-${conflictsmsg}
-EOF
diff --git a/configure.ac b/configure.ac
index 06bea48e..d5903c6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@
AC_DATE_VERSION_FROM_CHANGELOG(AUCTEXDATE,AUCTEXVERSION,ChangeLog)
AC_SUBST(AUCTEXDATE)
AC_SUBST(AUCTEXVERSION)
-AC_DATE_VERSION_FROM_CHANGELOG(PREVIEWDATE,PREVIEWVERSION,preview/ChangeLog)
+AC_DATE_VERSION_FROM_CHANGELOG(PREVIEWDATE,PREVIEWVERSION,ChangeLog-preview)
AC_SUBST(PREVIEWDATE)
AC_SUBST(PREVIEWVERSION)
@@ -56,10 +56,18 @@ AC_ARG_ENABLE([build-dir-test],
fi],
[VALID_BUILD_DIR])
+AC_ARG_ENABLE(preview,
+ [ --disable-preview disable inclusion of preview-latex],
+ [preview_enabled="$enableval"],
+ [preview_enabled="yes"])
+AC_SUBST(preview_enabled)
+
if test ${EMACS_FLAVOR} = "xemacs" ; then
EMACS_PATH_PACKAGEDIR
+ PLAT_LISP=prv-xemacs.el
else
packagedir=no
+ PLAT_LISP=prv-emacs.el
fi
if test "X${packagedir}" = Xno
@@ -78,6 +86,21 @@ then
auctexstartfile="${lispdir}/auctex.el"
fi])
AC_MSG_RESULT([[${auctexstartfile}]])
+
+ AC_MSG_CHECKING(what file to use for preview startup)
+ AC_ARG_WITH(previewstartfile,
+ [[ --with-previewstartfile=FILE What file to use for preview startup.]],
+ [[ previewstartfile="${withval}" ]],
+ [ _tmpdir_="${lispdir}"
+ AC_FULL_EXPAND(_tmpdir_)
+ if test -d "${_tmpdir_}/site-start.d"
+ then
+ previewstartfile="${lispdir}/site-start.d/preview-latex.el"
+ else
+ previewstartfile="${lispdir}/preview-latex.el"
+ fi])
+ AC_MSG_RESULT([[${previewstartfile}]])
+
packagelispdir="${lispdir}/auctex"
packagedatadir="${packagelispdir}"
texsitedir="${lispdir}"
@@ -87,12 +110,15 @@ else
packagelispdir="${packagedir}/lisp/auctex"
texsitedir="$packagelispdir"
auctexstartfile="${packagelispdir}"/auto-autoloads.el
+ previewstartfile="${packagelispdir}"/auto-autoloads.el
packagedatadir="${packagedir}/etc/auctex"
infodir="${packagedir}/info"
INSTALL_INFO=:
fi
AC_SUBST(auctexstartfile)
+AC_SUBST(previewstartfile)
+AC_SUBST(PLAT_LISP)
AC_MSG_CHECKING([where the package lisp files go])
AC_ARG_WITH(packagelispdir,
@@ -129,6 +155,111 @@ AC_PATH_PROG(TEX, tex, :)
AC_PATH_PROG(PDFTEX, pdftex, :)
AC_PATH_PROG(DVIPS, dvips, :)
+
+dnl Preview related options.
+if test "X${preview_enabled}" = Xyes
+then
+ AC_ARG_VAR(GS,[Ghostscript executable for batch operation])
+ AC_CHECK_PROGS(GS, gs GSWIN32C.EXE, NONE)
+
+ EMACS_LISP([[lispGS]],[[(if (member dir (list \"NONE\" (if (eq system-type
'windows-nt) \"GSWIN32C.EXE\" \"gs\"))) \"\" \`(defvar preview-gs-command
,dir))]],-no-site-file,[[dir]],[["${GS}"]])
+ AC_SUBST(lispGS)
+
+ dnl check to see if GS supports -dTextAlphaBits and -dGraphicsAlphaBits
+ dnl Check to see if specific drivers are built in.
+ dnl Need table of mappings, with priority
+
+ AC_PATH_PROG_REQUIRED(LATEX, latex, [LaTeX not found, aborting!
+ You must install LaTeX for preview to work.])
+
+ AC_PATH_PROG(PDFLATEX, pdflatex)
+
+ # Determine which latex-style components to install
+ # To match .sty, .def, .cfg, but _not_ .drv
+ TEXMFGEN=[`sed -n
's/^%<installer>.*file[{]\\([^}.]*\\.[sdc][tef][yfg]\\)[}].*/\\1/p'
latex/preview.dtx`]
+ # Replace newlines with spaces.
+ TEXMFGEN="`echo ${TEXMFGEN}`"
+ AC_SUBST(TEXMFGEN)
+
+ AC_PATH_PROG_REQUIRED(TEX, tex, NONE)
+
+ TEX_PATH_TEXMFDIR
+
+ if test "x${texmfdir}" = "xno"
+ then
+ packagetexstyles="${packagedatadir}/latex"
+ AC_LISPIFY_DIR(packagetexstyles,"${previewstartfile}")
+ lisppackagetexstyles="(defvar preview-TeX-style-dir
${lisppackagetexstyles})"
+ test "X${TEXHASH}" = X && TEXHASH=:
+ else
+ lisppackagetexstyles=
+ fi
+ AC_SUBST(lisppackagetexstyles)
+
+ # Be very careful about assuming things about the available hash programs
+ # MiKTeX comes with a braindead link to mktexlsr, apparently, so first
+ # try the regular utility from them.
+ AC_ARG_VAR(TEXHASH,[command to update the TeX filename database.
+ Set to : to skip updating the database on installation.
+ This is the default for --without-texmf-dir])
+
+ if test "X${TEXHASH}" = "X"
+ then
+ AC_PATH_PROG(TEXHASH, texhash)
+ AC_CHECK_PROG(TEXHASH, initexmf, initexmf -u)
+ if test "X${TEXHASH}" = X
+ then
+ AC_PATH_PROGS(TEXHASH, mktexlsr MakeTeXls-R, :)
+ fi
+ fi
+
+ AC_MSG_CHECKING([[for glaring installation conflicts]])
+ exppackagelispdir="$packagelispdir"
+ AC_FULL_EXPAND(exppackagelispdir)
+ exppreviewstartfile="$previewstartfile"
+ AC_FULL_EXPAND(exppreviewstartfile)
+
+ EMACS_LISP(shadows,[[
+ (concat
+ (and (setq tmp (locate-library \"preview.elc\"))
+ (not (string= (file-truename tmp)
+ (file-truename (expand-file-name \"preview.elc\"
+ packagelispdir))))
+ (format \"Conflicting previous installation in \`%s' found!\n\"
+ (file-name-directory tmp)))
+ (and (setq tmp (locate-library \"preview-latex.el\"))
+ (not (string= (file-truename tmp)
+ (file-truename previewstartfile)))
+ (format \"Conflicting previous startup file \`%s' found!\n\"
tmp)))]],,
+ [[packagelispdir previewstartfile]],[["${exppackagelispdir}"
"${exppreviewstartfile}"]])
+ if test "NONE${shadows}" != NONE
+ then
+ conflictsmsg="Conflicts with previous installations have been detected.
+ Please fix them before continuing.
+ "
+ AC_MSG_RESULT([[ouch!
+ ]])
+ AC_MSG_WARN([[${shadows}
+ ]])
+ else
+ conflictsmsg=
+ AC_MSG_RESULT([[probably none]])
+ fi
+
+ AC_SHELL_QUOTIFY(texmfdir)
+ AC_SHELL_QUOTIFY(exec_prefix)
+ AC_SHELL_QUOTIFY(libdir)
+ AC_SHELL_QUOTIFY(previewtexmfdir)
+ AC_SHELL_QUOTIFY(previewdocdir)
+ AC_SHELL_QUOTIFY(previewstartfile)
+ AC_SHELL_QUOTIFY(auctexdir)
+ AC_SHELL_QUOTIFY(datadir)
+ AC_SHELL_QUOTIFY(GS)
+ AC_SHELL_QUOTIFY(TEXHASH)
+ AC_SHELL_QUOTIFY(LATEX)
+ AC_SHELL_QUOTIFY(PDFLATEX)
+fi
+
AC_ARG_VAR(PERL,[Perl executable. If set to :, some documentation
cannot be regenerated, but installation of an unmodified tarball will
succeed.])
@@ -154,32 +285,6 @@ then
AC_PATH_PROG(INSTALL_INFO, install-info, :, ${PATH} /usr/sbin /sbin)
fi
-AC_ARG_ENABLE(preview,
- [ --disable-preview disable inclusion of preview-latex],
- [preview_enabled="$enableval"],
- [preview_enabled="yes"])
-AC_SUBST(preview_enabled)
-
-if test "X${preview_enabled}" = Xyes
-then
- auctexdir=..; export auctexdir
- export PDFTEX
- export DVIPS
- # Export unquoted variables.
- TEX_UNQUOTED="$TEX"
- export TEX_UNQUOTED
- packagedir_unquoted="$packagedir"
- export packagedir_unquoted
- packagelispdir_unquoted="$packagelispdir"
- export packagelispdir_unquoted
- packagedatadir_unquoted="$packagedatadir"
- export packagedatadir_unquoted
- EMACS_UNQUOTED="$EMACS"
- export EMACS_UNQUOTED
- AC_CONFIG_SUBDIRS(preview)
-fi
-AC_SUBST(subdirs)
-
AC_SHELL_QUOTIFY(prefix)
AC_SHELL_QUOTIFY(localstatedir)
AC_SHELL_QUOTIFY(packagedir)
@@ -201,7 +306,7 @@ AC_SHELL_QUOTIFY(TEXI2HTML)
AC_SHELL_QUOTIFY(TEXI2DVI)
AC_SHELL_QUOTIFY(TEXI2PDF)
-AC_OUTPUT(Makefile tex-site.el.out:tex-site.el.in preview/preview.el
doc/Makefile auctex.el)
+AC_OUTPUT(Makefile tex-site.el.out:tex-site.el.in doc/Makefile auctex.el
preview.el auto.el latex/Makefile)
cat >&2 <<EOF
diff --git a/context.el b/context.el
index b9ce2c00..30b670e0 100644
--- a/context.el
+++ b/context.el
@@ -64,16 +64,19 @@
;;; variables
-;; globals used in certain macro's.
-(defvar done-mark nil
- "Position of point afterwards, default nil (meaning end).")
+;; Dynamically scoped vars used in certain macro's.
+;; BEWARE: We used to give them a global nil value, but this can mess up poor
+;; unrelated packages using those same vars but expecting them to be
+;; lexically scoped.
+;; So don't give them a global value, which makes sure the effect of `defvar'
+;; localized to this file!
+(defvar done-mark) ;Position of point afterwards, default nil (meaning end)
-(defvar reference nil
- "Set by `ConTeXt-section-ref', used by `ConTeXt-section-section'.")
-
-(defvar title nil
- "Set by `ConTeXt-section-title', used by `ConTeXt-section-section'.")
+(defvar reference);Used by `ConTeXt-section-ref' and `ConTeXt-section-section'.
+(defvar title); Used by `ConTeXt-section-title' and `ConTeXt-section-section'.
+(defvar name)
+(defvar level)
;; others
@@ -302,8 +305,8 @@ The following variables can be set to customize:
(ConTeXt-up-section (- val)))
(t val)))
(name (ConTeXt-numbered-section-name level))
- (toc nil)
(title "")
+ (reference nil)
(done-mark (make-marker)))
(newline)
(run-hooks 'ConTeXt-numbered-section-hook)
@@ -410,9 +413,9 @@ section."
The following variables are set before the hooks are run
-level - numeric section level, see the documentation of `ConTeXt-section'.
-name - name of the sectioning command, derived from `level'.
-title - The title of the section, default to an empty string.
+`level' - numeric section level, see the documentation of `ConTeXt-section'.
+`name' - name of the sectioning command, derived from `level'.
+`title' - The title of the section, default to an empty string.
`done-mark' - Position of point afterwards, default nil (meaning end).
The following standard hook exist -
@@ -451,13 +454,14 @@ in your .emacs file."
ConTeXt-section-title
ConTeXt-section-ref
ConTeXt-section-section)
+ ;; FIXME: I can't see where this variable is used!
"List of hooks to run when a new section is inserted.
The following variables are set before the hooks are run
-level - numeric section level, see the documentation of `ConTeXt-section'.
-name - name of the sectioning command, derived from `level'.
-title - The title of the section, default to an empty string.
+`level' - numeric section level, see the documentation of `ConTeXt-section'.
+`name' - name of the sectioning command, derived from `level'.
+`title' - The title of the section, default to an empty string.
`done-mark' - Position of point afterwards, default nil (meaning end).
The following standard hook exist -
@@ -519,7 +523,7 @@ the name of the sectioning command inserted with
`\\[ConTeXt-section]'."
"Hook to prompt for ConTeXt section title.
Insert this hook into `ConTeXt-(un)numbered-section-hook' to allow the user to
change
the title of the section inserted with `\\[ConTeXt-section]."
- (setq title (read-string "What title: ")))
+ (setq title (TeX-read-string "What title: ")))
(defun ConTeXt-section-section ()
"Hook to insert ConTeXt section command into the file.
@@ -856,8 +860,7 @@ If INNER is non-nil, go to the point just past before
(ConTeXt-environment-stop-name)
"\\)"
))
- (level 1)
- (pos))
+ (level 1))
;;jump over the \start... when at the beginning of it.
(when (looking-at (concat (regexp-quote TeX-esc)
(ConTeXt-environment-start-name)))
@@ -935,13 +938,13 @@ If INNER is non-nil, go to the point just past the
\\start... macro."
;;; Macro Argument Hooks
-(defun ConTeXt-optional-argument-insert (arg &optional prefix)
+(defun ConTeXt-optional-argument-insert (arg &optional _prefix)
"Insert ARG surrounded by square brackets."
(insert ConTeXt-optop)
(insert arg)
(insert ConTeXt-optcl))
-(defun ConTeXt-required-argument-insert (arg &optional prefix)
+(defun ConTeXt-required-argument-insert (arg &optional _prefix)
"Insert ARG surrounded by curly braces."
(insert TeX-grop)
(insert arg)
@@ -1150,7 +1153,7 @@ An optional fourth (or sixth) element means always
replace if t."
(modify-syntax-entry ?\( "." ConTeXt-indent-syntax-table)
(modify-syntax-entry ?\) "." ConTeXt-indent-syntax-table))
-(defun ConTeXt-indent-line (&optional arg)
+(defun ConTeXt-indent-line (&optional _arg)
(with-syntax-table ConTeXt-indent-syntax-table
;; TODO: Rather than ignore $, we should try to be more clever about it.
(let ((indent
@@ -1696,7 +1699,7 @@ i.e. you do _not_ have to cater for this yourself by
adding \\\\' or $."
(easy-menu-add ConTeXt-mode-command-menu ConTeXt-mode-map)
(setq ConTeXt-menu-changed t)
- (if (= emacs-major-version 20)
+ (if (fboundp 'make-local-hook)
(make-local-hook 'activate-menubar-hook))
(add-hook 'activate-menubar-hook 'ConTeXt-menu-update nil t)
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 8507821a..0855186d 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -149,8 +149,8 @@ preview-latex/index.html: $(PREVIEWTEXIFILES)
html-docs: preview-latex/index.html
-preview-dtxdoc.texi: ../preview/latex/preview.dtx preview-dtxdoc.pl
- -$(PERL) preview-dtxdoc.pl ../preview/latex/preview.dtx \
+preview-dtxdoc.texi: ../latex/preview.dtx preview-dtxdoc.pl
+ -$(PERL) preview-dtxdoc.pl ../latex/preview.dtx \
preview-dtxdoc.texi
preview-latex.dvi: $(PREVIEWTEXIFILES)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 08bf8cf6..8fb997cc 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2655,6 +2655,22 @@ file. The command is then actually run on the region
file. See above
for details.
@end deffn
+@deffn Command LaTeX-command-section
+@kindex C-c C-z
+(@kbd{C-c C-z}) Query the user for a command, and apply it to the
+current section (or part, chapter, subsection, paragraph, or
+subparagraph). What makes the current section is determined by
+@code{LaTeX-command-section-level} which can be enlarged/shrunken using
+@code{LaTeX-command-section-change-level} (@kbd{C-c M-z}). The given
+numeric prefix arg is added to the current value of
+@code{LaTeX-command-section-level}. By default,
+@code{LaTeX-command-section-level} is initialized with the current
+document's @code{LaTeX-largest-level}. The buffer contents are written
+into the region file, after extracting the header and trailer from the
+master file. The command is then actually run on the region file. See
+@code{TeX-command-region} for details.
+@end deffn
+
@defopt TeX-region
The name of the file for temporarily storing the text when formatting
the current region.
@@ -2699,7 +2715,7 @@ process associated with the current document.
@node Selecting a Command
@subsection Selecting and Executing a Command
-Once you started the command selection with @kbd{C-c C-c}, @kbd{C-c C-s}
+Once you started the command selection with @kbd{C-c C-c}, @kbd{C-c C-r}
or @kbd{C-c C-b} you will be prompted for the type of command.
@AUCTeX{} will try to guess which command is appropriate in the given
situation and propose it as default. Usually this is a processor like
@@ -2786,7 +2802,7 @@ should be produced, if @TeX{} should be started in
interactive or
nonstop mode, if source specials or a Sync@TeX{} file should be produced
for making inverse and forward search possible or which @TeX{} engine
should be used instead of regular @TeX{}, like PDF@TeX{}, Omega or
-Xe@TeX{}.
+Xe@TeX{}, and the style error messages are printed with.
@deffn Command TeX-PDF-mode
@kindex C-c C-t C-p
@@ -2929,6 +2945,13 @@ produced.
If non-nil, the output of @TeX{} compilation is shown in another window.
@end defopt
+You can instruct @TeX{} to print error messages in the form
+file:line:error which is similar to the way many compilers format them.
+
+@defopt TeX-file-line-error
+If non-nil, @TeX{} will produce file:line:error style error messages.
+@end defopt
+
@node Viewing
@section Viewing the Formatted Output
@cindex Viewing
@@ -3022,6 +3045,12 @@ exact format to use.) The command line can also contain
placeholders as
defined in @code{TeX-expand-list} which are expanded before the viewer
is called.
+The third element of each item is a string, or a list of strings, with
+the name of the executable, or executables, needed to open the output
+file in the viewer. Placeholders defined in @code{TeX-expand-list} can
+be used here. This element is optional and is used to check whether the
+viewer is actually available on the system.
+
A built-in viewer spec from @code{TeX-view-program-list-builtin} can be
overwritten by defining a new viewer spec with the same name.
@end defopt
@@ -4097,7 +4126,6 @@ files will be executed.
@defopt TeX-style-path
List of directories to search for @AUCTeX{} style files.
-Each must end with a slash.
@end defopt
By default, when @AUCTeX{} searches a directory for files, it will
@@ -4145,7 +4173,6 @@ Directories containing the site's @TeX{} style files.
@defopt TeX-style-global
Directory containing hand generated @TeX{} information.
-Must end with a slash.
These correspond to @TeX{} macros shared by all users of a site.
@end defopt
@@ -4218,14 +4245,12 @@ set @code{TeX-auto-local} to nil.
@defopt TeX-style-local
Directory containing hand generated @TeX{} information.
-Must end with a slash.
These correspond to @TeX{} macros found in the current directory.
@end defopt
@defopt TeX-auto-local
Directory containing automatically generated @TeX{} information.
-Must end with a slash.
These correspond to @TeX{} macros found in the current directory.
@end defopt
diff --git a/doc/changes.texi b/doc/changes.texi
index 056177e2..a4b2e76a 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -8,6 +8,18 @@
@end ifset
+@heading News since 11.88
+
+@itemize @bullet
+@item
+New option @code{TeX-file-line-error} allows to select file:line:error
+style for error messages.
+
+@item
+@code{TeX-view-program-list} can contain, as third optional element of
+each item, the name of the executable(s) needed to open the viewer.
+@end itemize
+
@heading News in 11.88
@itemize @bullet
diff --git a/doc/faq.texi b/doc/faq.texi
index f634560c..94a0e8d6 100644
--- a/doc/faq.texi
+++ b/doc/faq.texi
@@ -1,5 +1,5 @@
@c This is part of the AUCTeX Manual.
-@c Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+@c Copyright (C) 2004-2014 Free Software Foundation, Inc.
@c See the file auctex.texi for copying conditions.
@ifset rawfile
@include macros.texi
@@ -128,18 +128,20 @@ error in your init file.
@item
Why does @code{TeX-next-error} (@kbd{C-c `}) fail?
-When writing the log file, @TeX{} puts information related to a file,
-including error messages, between a pair of parentheses. @AUCTeX{}
+If @code{TeX-file-line-error} is set to nil (not the default), these
+sort of failures might be related to the the fact that when writing the
+log file, @TeX{} puts information related to a file, including error
+messages, between a pair of parentheses. In this scenario @AUCTeX{}
determines the file where the error happened by parsing the log file and
counting the parentheses. This can fail when there are other,
unbalanced parentheses present.
-As a workaround you can activate so-called file:line:error messages for
-the log file. (Those are are easier to parse, but may lack some
-details.) Either you do this in the configuration of your @TeX{} system
-(consult its manual to see where this is) or you add a command line
-switch to the (la)tex call, e.g. by customizing
-@code{LaTeX-command-style} or @code{TeX-command-list}.
+Activating so-called file:line:error messages for the log file usually
+solves this issue, as these kind of messages are are easier to parse;
+however, they may lack some details. Activation can be done either in
+the configuration of your @TeX{} system (consult its manual to see where
+this is) or by simply keeping the variable @code{TeX-file-line-error} to
+the default value of non-nil.
@item
What does AUC stand for?
diff --git a/doc/quickstart.texi b/doc/quickstart.texi
index e6fa6613..90076ce0 100644
--- a/doc/quickstart.texi
+++ b/doc/quickstart.texi
@@ -186,10 +186,10 @@ Delete the innermost font specification containing point.
@end table
-If you want to change font attributes of existing text, mark it as a
-region, and then invoke the commands. If no region is selected, the
-command will be inserted with empty braces, and you can start typing the
-changed text.
+If you want to change font attributes of existing text, mark it as an
+active region, and then invoke the commands. If no region is selected,
+the command will be inserted with empty braces, and you can start typing
+the changed text.
Most of those commands will also work in math mode, but then macros like
@code{\mathbf} will be inserted.
diff --git a/latex.el b/latex.el
index 549fe67a..0022ae24 100644
--- a/latex.el
+++ b/latex.el
@@ -30,7 +30,7 @@
(require 'tex)
(require 'tex-style)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl)) ;FIXME: Use cl-lib.
;;; Syntax
@@ -107,6 +107,13 @@ This depends on `LaTeX-insert-into-comments'."
;;; Sections
+;; Declare dynamically scoped vars.
+(defvar title)
+(defvar name)
+(defvar level)
+(defvar done-mark)
+(defvar toc)
+
(defun LaTeX-section (arg)
"Insert a template for a LaTeX section.
Determine the type of section to be inserted, by the argument ARG.
@@ -445,7 +452,7 @@ the name of the sectioning command inserted with
`\\[LaTeX-section]'."
"Hook to prompt for LaTeX section title.
Insert this hook into `LaTeX-section-hook' to allow the user to change
the title of the section inserted with `\\[LaTeX-section]."
- (setq title (read-string "Title: " title))
+ (setq title (TeX-read-string "Title: " title))
(let ((region (and (TeX-active-mark)
(cons (region-beginning) (region-end)))))
(when region (delete-region (car region) (cdr region)))))
@@ -454,7 +461,7 @@ the title of the section inserted with `\\[LaTeX-section]."
"Hook to prompt for the LaTeX section entry in the table of content .
Insert this hook into `LaTeX-section-hook' to allow the user to insert
a different entry for the section in the table of content."
- (setq toc (read-string "Toc Entry: "))
+ (setq toc (TeX-read-string "Toc Entry: "))
(if (zerop (length toc))
(setq toc nil)))
@@ -590,7 +597,7 @@ It may be customized with the following variables:
(dolist (elt prompts)
(let* ((optional (vectorp elt))
(elt (if optional (elt elt 0) elt))
- (arg (read-string (concat (when optional "(Optional) ")
+ (arg (TeX-read-string (concat (when optional "(Optional)
")
elt ": "))))
(setq args (concat args
(cond ((and optional (> (length arg) 0))
@@ -792,7 +799,7 @@ work analogously."
To insert a hook here, you must insert it in the appropiate style file.")
-(defun LaTeX-env-document (&optional ignore)
+(defun LaTeX-env-document (&optional _ignore)
"Create new LaTeX document.
Also inserts a \\documentclass macro if there's none already and
prompts for the insertion of \\usepackage macros.
@@ -926,7 +933,14 @@ If nil, act like the empty string is given, but do not
prompt."
("eqnarray" . LaTeX-eqnarray-label))
"Lookup prefixes for labels.
An alist where the CAR is the environment name, and the CDR
-either the prefix or a symbol referring to one."
+either the prefix or a symbol referring to one.
+
+If the name is not found, or if the CDR is nil, no label is
+automatically inserted for that environment.
+
+If you want to automatically insert a label for a environment but
+with an empty prefix, use the empty string \"\" as the CDR of the
+corresponding entry."
:group 'LaTeX-label
:type '(repeat (cons (string :tag "Environment")
(choice (string :tag "Label prefix")
@@ -934,10 +948,16 @@ either the prefix or a symbol referring to one."
(make-variable-buffer-local 'LaTeX-label-alist)
-(defun LaTeX-label (name type)
+(defun LaTeX-label (name &optional type)
"Insert a label for NAME at point.
-TYPE can be either environment or section. If
-`LaTeX-label-function' is a valid function, LaTeX label will
+The optional TYPE argument can be either environment or section:
+in the former case this function looks up `LaTeX-label-alist' to
+choose which prefix to use for the label, in the latter case
+`LaTeX-section-label' will be looked up instead. If TYPE is nil,
+you will be always prompted for a label, with an empty default
+prefix.
+
+If `LaTeX-label-function' is a valid function, LaTeX label will
transfer the job to this function."
(let ((prefix (cond
((eq type 'environment)
@@ -948,7 +968,11 @@ transfer the job to this function."
LaTeX-section-label
(and (listp LaTeX-section-label)
(cdr (assoc name LaTeX-section-label))))
- ""))))
+ ""))
+ ((null type)
+ "")
+ (t
+ nil)))
label)
(when (symbolp prefix)
(setq prefix (symbol-value prefix)))
@@ -976,8 +1000,8 @@ transfer the job to this function."
"Create ENVIRONMENT with \\caption and \\label commands."
(let ((float (and LaTeX-float ; LaTeX-float can be nil, i.e.
; do not prompt
- (read-string "(Optional) Float position: " LaTeX-float)))
- (caption (read-string "Caption: "))
+ (TeX-read-string "(Optional) Float position: "
LaTeX-float)))
+ (caption (TeX-read-string "Caption: "))
(center (y-or-n-p "Center? "))
(active-mark (and (TeX-active-mark)
(not (eq (mark) (point)))))
@@ -997,7 +1021,8 @@ transfer the job to this function."
(when center
(insert TeX-esc "centering")
(indent-according-to-mode)
- (LaTeX-newline))
+ (LaTeX-newline)
+ (indent-according-to-mode))
;; Insert caption and ask for a label, do nothing if user skips caption
(unless (zerop (length caption))
(if (member environment LaTeX-top-caption-list)
@@ -1043,8 +1068,8 @@ transfer the job to this function."
Just like array and tabular."
(let ((pos (and LaTeX-default-position ; LaTeX-default-position can
; be nil, i.e. do not prompt
- (read-string "(Optional) Position: " LaTeX-default-position)))
- (fmt (read-string "Format: " LaTeX-default-format)))
+ (TeX-read-string "(Optional) Position: "
LaTeX-default-position)))
+ (fmt (TeX-read-string "Format: " LaTeX-default-format)))
(setq LaTeX-default-position pos)
(setq LaTeX-default-format fmt)
(LaTeX-insert-environment environment
@@ -1063,7 +1088,7 @@ Just like array and tabular."
(defun LaTeX-env-list (environment)
"Insert ENVIRONMENT and the first item."
- (let ((label (read-string "Default Label: ")))
+ (let ((label (TeX-read-string "Default Label: ")))
(LaTeX-insert-environment environment
(format "{%s}{}" label))
(end-of-line 0)
@@ -1075,8 +1100,8 @@ Just like array and tabular."
"Create new LaTeX minipage or minipage-like ENVIRONMENT."
(let ((pos (and LaTeX-default-position ; LaTeX-default-position can
; be nil, i.e. do not prompt
- (read-string "(Optional) Position: " LaTeX-default-position)))
- (width (read-string "Width: " LaTeX-default-width)))
+ (TeX-read-string "(Optional) Position: "
LaTeX-default-position)))
+ (width (TeX-read-string "Width: " LaTeX-default-width)))
(setq LaTeX-default-position pos)
(setq LaTeX-default-width width)
(LaTeX-insert-environment environment
@@ -1087,11 +1112,11 @@ Just like array and tabular."
(defun LaTeX-env-tabular* (environment)
"Insert ENVIRONMENT with width, position and column specifications."
- (let ((width (read-string "Width: " LaTeX-default-width))
+ (let ((width (TeX-read-string "Width: " LaTeX-default-width))
(pos (and LaTeX-default-position ; LaTeX-default-position can
; be nil, i.e. do not prompt
- (read-string "(Optional) Position: " LaTeX-default-position)))
- (fmt (read-string "Format: " LaTeX-default-format)))
+ (TeX-read-string "(Optional) Position: "
LaTeX-default-position)))
+ (fmt (TeX-read-string "Format: " LaTeX-default-format)))
(setq LaTeX-default-width width)
(setq LaTeX-default-position pos)
(setq LaTeX-default-format fmt)
@@ -1105,10 +1130,10 @@ Just like array and tabular."
(defun LaTeX-env-picture (environment)
"Insert ENVIRONMENT with width, height specifications."
- (let ((width (read-string "Width: "))
- (height (read-string "Height: "))
- (x-offset (read-string "X Offset: "))
- (y-offset (read-string "Y Offset: ")))
+ (let ((width (TeX-read-string "Width: "))
+ (height (TeX-read-string "Height: "))
+ (x-offset (TeX-read-string "X Offset: "))
+ (y-offset (TeX-read-string "Y Offset: ")))
(if (zerop (length x-offset))
(setq x-offset "0"))
(if (zerop (length y-offset))
@@ -1124,7 +1149,7 @@ Just like array and tabular."
"Insert ENVIRONMENT with label for bibitem."
(LaTeX-insert-environment environment
(concat TeX-grop
- (read-string "Label for BibItem: " "99")
+ (TeX-read-string "Label for BibItem: " "99")
TeX-grcl))
(end-of-line 0)
(delete-char 1)
@@ -1138,7 +1163,7 @@ Just like array and tabular."
(error "Put %s environment before \\begin{document}" environment)))
(LaTeX-insert-environment environment
(concat TeX-grop
- (read-string "File: ")
+ (TeX-read-string "File: ")
TeX-grcl))
(delete-horizontal-space))
@@ -1170,6 +1195,8 @@ You may use `LaTeX-item-list' to change the routines used
to insert the item."
(TeX-insert-macro "item"))
(indent-according-to-mode)))
+(defvar TeX-arg-item-label-p)
+
(defun LaTeX-item-argument ()
"Insert a new item with an optional argument."
(let ((TeX-arg-item-label-p t))
@@ -1479,8 +1506,10 @@ The input string may include LaTeX comments and
newlines."
(point))))
;; Add entry to output.
((or (string= match ",") (= (point) (point-max)))
- (add-to-list 'opts (buffer-substring-no-properties
- start (1- (point))) t)
+ (let ((entry (buffer-substring-no-properties
+ start (1- (point)))))
+ (unless (member entry opts)
+ (setq opts (append opts (list entry)))))
(setq start (point)))
;; Get rid of comments.
((string= match "%")
@@ -1711,6 +1740,8 @@ list of defined labels."
(LaTeX-add-labels label))
(TeX-argument-insert label optional optional)))
+(defvar reftex-ref-macro-prompt)
+
(defun TeX-arg-ref (optional &optional prompt definition)
"Let-bind `reftex-ref-macro-prompt' to nil and pass arguments
to `TeX-arg-label'.
@@ -1720,7 +1751,7 @@ arguments: OPTIONAL, PROMPT, and DEFINITION."
(let ((reftex-ref-macro-prompt nil))
(TeX-arg-label optional prompt definition)))
-(defun TeX-arg-index-tag (optional &optional prompt &rest args)
+(defun TeX-arg-index-tag (optional &optional prompt &rest _args)
"Prompt for an index tag.
This is the name of an index, not the entry.
@@ -1728,7 +1759,7 @@ If OPTIONAL is non-nil, insert the resulting value as an
optional
argument, otherwise as a mandatory one. Use PROMPT as the prompt
string. ARGS is unused."
(TeX-argument-insert
- (read-string (TeX-argument-prompt optional prompt "Index tag")) optional))
+ (TeX-read-string (TeX-argument-prompt optional prompt "Index tag"))
optional))
(defun TeX-arg-index (optional &optional prompt &rest args)
"Prompt for an index entry completing with known entries.
@@ -1952,7 +1983,7 @@ May be reset with `\\[universal-argument]
\\[TeX-normal-mode]'.")
To insert a hook here, you must insert it in the appropiate style file.")
-(defun TeX-arg-document (optional &optional ignore)
+(defun TeX-arg-document (optional &optional _ignore)
"Insert arguments to documentclass.
OPTIONAL and IGNORE are ignored."
(let* ((TeX-file-extensions '("cls"))
@@ -1988,7 +2019,7 @@ OPTIONAL and IGNORE are ignored."
LaTeX-default-options
(mapconcat 'identity LaTeX-default-options
",")))
","))))
- (setq options (read-string "Options: ")))
+ (setq options (TeX-read-string "Options: ")))
(unless (zerop (length options))
(insert LaTeX-optop options LaTeX-optcl)
(let ((opts (LaTeX-listify-package-options options)))
@@ -2052,7 +2083,7 @@ of the options, nil otherwise."
(TeX-completing-read-multiple
"Options: " (mapcar 'list (symbol-value var)))
","))))
- (setq options (read-string "Options: ")))
+ (setq options (TeX-read-string "Options: ")))
(cons packages options))))
(defun LaTeX-arg-usepackage-insert (packages options)
@@ -2067,7 +2098,7 @@ of the options, nil otherwise."
(insert TeX-grop (mapconcat 'identity packages ",") TeX-grcl)
(run-hooks 'LaTeX-after-usepackage-hook))
-(defun LaTeX-arg-usepackage (optional)
+(defun LaTeX-arg-usepackage (_optional)
"Insert arguments to usepackage.
OPTIONAL is ignored."
(let* ((packages-options (LaTeX-arg-usepackage-read-packages-with-options))
@@ -2314,7 +2345,7 @@ the list of defined pagestyles."
:group 'LaTeX-macro
:type 'character)
-(defun TeX-arg-verb (optional &optional ignore)
+(defun TeX-arg-verb (optional &optional _ignore)
"Prompt for delimiter and text.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one. IGNORE is ignored."
@@ -2338,8 +2369,8 @@ comma.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one."
- (insert "(" (read-string (concat first ": ")) ","
- (read-string (concat second ": ")) ")"))
+ (insert "(" (TeX-read-string (concat first ": ")) ","
+ (TeX-read-string (concat second ": ")) ")"))
(defun TeX-arg-size (optional)
"Insert width and height as a pair.
@@ -2462,6 +2493,8 @@ OPTIONAL is ignored."
(LaTeX-insert-corresponding-right-macro-and-brace
left-macro left-brace optional)))))
+(defvar TeX-arg-right-insert-p)
+
(defun LaTeX-insert-left-brace (arg)
"Insert typed left brace ARG times and possibly a correspondig right brace.
Automatic right brace insertion is done only if no prefix ARG is given and
@@ -2581,7 +2614,7 @@ Insert the given value as a TeX macro argument. If
OPTIONAL is
non-nil, insert it as an optional argument. Use PROMPT as the
prompt string. `LaTeX-default-author' is the initial input."
(let ((author (if LaTeX-default-author
- (read-string
+ (TeX-read-string
(TeX-argument-prompt optional prompt "Author(s)")
(if (symbolp LaTeX-default-author)
(symbol-value LaTeX-default-author)
@@ -2941,7 +2974,8 @@ Lines starting with an item is given an extra indentation
of
;; the 'invisible property.
(dolist (ol overlays)
(when (extent-property ol 'invisible)
- (add-to-list 'ol-specs (list ol (extent-property ol 'invisible)))
+ (pushnew (list ol (extent-property ol 'invisible))
+ ol-specs :test #'equal)
(set-extent-property ol 'invisible nil)))
(save-excursion
(cond ((and fill-prefix
@@ -3717,8 +3751,7 @@ space does not end a sentence, so don't break a line
there."
(when LaTeX-fill-break-at-separators
(let ((orig-breakpoint (point))
(final-breakpoint (point))
- start-point
- math-sep)
+ start-point)
(save-excursion
(beginning-of-line)
(LaTeX-back-to-indentation)
@@ -5232,6 +5265,9 @@ environmens."
(define-key map "\C-c\C-q\C-s" 'LaTeX-fill-section)
(define-key map "\C-c\C-q\C-e" 'LaTeX-fill-environment)
+ (define-key map "\C-c\C-z" 'LaTeX-command-section)
+ (define-key map "\C-c\M-z" 'LaTeX-command-section-change-level)
+
(define-key map "\C-c." 'LaTeX-mark-environment) ;*** Dubious
(define-key map "\C-c*" 'LaTeX-mark-section) ;*** Dubious
@@ -5263,9 +5299,9 @@ environmens."
"Create an entry for the change environment menu."
(vector (car entry) (list 'LaTeX-modify-environment (car entry)) t))
-(defun LaTeX-section-enable-symbol (LEVEL)
+(defun LaTeX-section-enable-symbol (level)
"Symbol used to enable section LEVEL in the menu bar."
- (intern (concat "LaTeX-section-" (int-to-string (nth 1 entry)) "-enable")))
+ (intern (concat "LaTeX-section-" (int-to-string level) "-enable")))
(defun LaTeX-section-enable (entry)
"Enable or disable section ENTRY from `LaTeX-section-list'."
@@ -6299,10 +6335,10 @@ i.e. you do _not_ have to cater for this yourself by
adding \\\\' or $."
(format "\\\\end{%s}"
(regexp-opt
(let (out)
- (mapcar (lambda (x)
- (when (eq (cadr x) 'LaTeX-indent-tabular)
- (push (car x) out)))
- LaTeX-indent-environment-list)
+ (mapc (lambda (x)
+ (when (eq (cadr x) 'LaTeX-indent-tabular)
+ (push (car x) out)))
+ LaTeX-indent-environment-list)
out)))))
(cond ((looking-at tabular-like-end-regex)
beg-col)
diff --git a/latex/README b/latex/README
deleted file mode 100644
index 0d0e8a80..00000000
--- a/latex/README
+++ /dev/null
@@ -1,64 +0,0 @@
-The preview.sty style file
-==========================
-
-Purpose
--------
-
-The main purpose of the preview package is the extraction of selected
-elements from a LaTeX source, like formulas or graphics, into separate
-pages of a DVI file. A flexible and convenient interface allows it to
-specify what commands and constructs should be extracted. This works
-with DVI files postprocessed by either Dvips and Ghostscript or
-dvipng, but it also works when you are using PDFTeX for generating PDF
-files.
-
-Current uses of the package include the preview-latex package for
-WYSIWYG functionality in the AUCTeX editing environment, generation of
-previews in LyX, as part of the operation of the ps4pdf and pst-pdf
-packages, the tbook XML system and some other tools.
-
-Availability
-------------
-
-The preview package is being developed along and distributed with
-AUCTeX. It can therefore be obtained as part of AUCTeX distribution
-files available at <URL:ftp://ftp.gnu.org/pub/gnu/auctex/> or its
-mirror at <CTAN:support/auctex>. CTAN also provides a standalone
-version at <CTAN:macros/latex/contrib/preview>. The project page at
-<URL:http://savannah.gnu.org/projects/auctex/> offers downloads and
-anonymous CVS access for cutting edge versions. For more information
-about the preview package please refer to the home page of AUCTeX at
-<URL:http://www.gnu.org/software/auctex/>.
-
-Installation
-------------
-
-To install the preview style file on its own without the entire AUCTeX
-package, run
-tex preview.ins
-If preview.ins happens to be missing, you can regenerate it by running
-tex docstrip
-on preview.dtx with the option `installer'.
-
-Running TeX on preview.ins will then extract further files:
-preview.drv which you can run through LaTeX in order to get the
-documentation for preview.sty, preview.sty itself, a bunch of option
-files with extension .def and a few configuration files with extension
-.cfg. In case your docstrip configuration has not already taken care
-of that, install the files with extension .sty, .def and .cfg to a
-location where LaTeX will be able to find them, generate the
-documentation and have fun.
-
-The license of the original file is the GPL which you'll find a copy
-of in the complete AUCTeX distribution. The distribution will also
-unpack and install the respective LaTeX files with an
-autoconf-supported mechanism, so you might consider using that.
-
-Bug reporting
--------------
-
-Please report problems to <URL:mailto:bug-auctex@gnu.org>, including a
-small example file which uses the \listfiles statement, and the
-resulting log file.
-
-David Kastrup
diff --git a/multi-prompt.el b/multi-prompt.el
index 25ba4c9d..ed88d155 100644
--- a/multi-prompt.el
+++ b/multi-prompt.el
@@ -1,6 +1,6 @@
;;; multi-prompt.el --- Completing read of multiple strings
-;; Copyright (C) 1996, 1997, 2000, 2009 Free Software Foundation
+;; Copyright (C) 1996, 1997, 2000, 2009, 2014 Free Software Foundation
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Maintainer: auctex-devel@gnu.org
@@ -62,7 +62,6 @@ are the arguments to `completing-read'. See that."
(let* ((minibuffer-local-completion-map new-map)
(minibuffer-local-must-match-map new-map)
(multi-prompt-found nil)
- (done nil)
(filter (cond (unique
(lambda (x)
(and (not (member (car x) multi-prompt-found))
@@ -119,8 +118,8 @@ are the arguments to `completing-read'. See that."
(interactive)
(when (call-interactively 'minibuffer-complete)
(let ((content (buffer-substring-no-properties (point-min) (point-max))))
- (when (or (not require-match)
- (assoc content table))
+ (when (or ;; (not require-match)
+ (assoc content minibuffer-completion-table))
(throw 'multi-prompt-next content)))))
diff --git a/preview-latex.info b/preview-latex.info
index e72e6bae..97ab0192 100644
--- a/preview-latex.info
+++ b/preview-latex.info
@@ -2,7 +2,7 @@ This is preview-latex.info, produced by makeinfo version 5.2
from
preview-latex.texi.
This manual is for preview-latex, a LaTeX preview mode for AUCTeX
-(version 11.88 from 2014-10-29).
+(version 11.88.2014-11-28 from 2014-11-28).
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
@@ -1900,7 +1900,7 @@ Appendix C Copying this Manual
The copyright notice for this manual is:
This manual is for preview-latex, a LaTeX preview mode for AUCTeX
-(version 11.88 from 2014-10-29).
+(version 11.88.2014-11-28 from 2014-11-28).
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
@@ -2520,41 +2520,41 @@ Index
Tag Table:
-Node: Top941
-Node: Copying2213
-Node: Introduction2667
-Node: What use is it?3341
-Node: Activating preview-latex4730
-Node: Getting started5545
-Node: Basic modes of operation7633
-Node: More documentation8835
-Node: Availability9723
-Node: Contacts10328
-Node: Installation11600
-Node: Keys and lisp11801
-Node: Simple customization18465
-Node: Known problems24225
-Node: Font problems with Dvips25013
-Node: Too small bounding boxes26186
-Node: x-symbol interoperation27582
-Node: Middle-clicks paste instead of toggling28965
-Node: For advanced users29781
-Node: The LaTeX style file30280
-Node: Package options32841
-Node: Provided commands43745
-Node: The Emacs interface51092
-Node: The preview images60263
-Node: Misplaced previews63746
-Node: ToDo67200
-Node: Frequently Asked Questions71971
-Node: Introduction to FAQ72372
-Node: Requirements72711
-Node: Installation Trouble75682
-Node: Customization78244
-Node: Troubleshooting81789
-Node: Other formats84307
-Node: Copying this Manual85622
-Node: GNU Free Documentation License86550
-Node: Index111672
+Node: Top952
+Node: Copying2224
+Node: Introduction2678
+Node: What use is it?3352
+Node: Activating preview-latex4741
+Node: Getting started5556
+Node: Basic modes of operation7644
+Node: More documentation8846
+Node: Availability9734
+Node: Contacts10339
+Node: Installation11611
+Node: Keys and lisp11812
+Node: Simple customization18476
+Node: Known problems24236
+Node: Font problems with Dvips25024
+Node: Too small bounding boxes26197
+Node: x-symbol interoperation27593
+Node: Middle-clicks paste instead of toggling28976
+Node: For advanced users29792
+Node: The LaTeX style file30291
+Node: Package options32852
+Node: Provided commands43756
+Node: The Emacs interface51103
+Node: The preview images60274
+Node: Misplaced previews63757
+Node: ToDo67211
+Node: Frequently Asked Questions71982
+Node: Introduction to FAQ72383
+Node: Requirements72722
+Node: Installation Trouble75693
+Node: Customization78255
+Node: Troubleshooting81800
+Node: Other formats84318
+Node: Copying this Manual85633
+Node: GNU Free Documentation License86572
+Node: Index111694
End Tag Table
diff --git a/preview.el b/preview.el
index 4373084e..c5556ba2 100644
--- a/preview.el
+++ b/preview.el
@@ -52,8 +52,8 @@ preview-latex buffers will not survive across sessions.")))
(require 'reporter)
(file-error (message "Missing reporter library, probably from the mail-lib
package:
preview-latex's bug reporting commands will probably not work.")))
- (require 'info)
- (defvar error))
+ (require 'info))
+(defvar error)
;; we need the compatibility macros which do _not_ get byte-compiled.
(eval-when-compile
@@ -506,20 +506,20 @@ of a cell used for string concatenation."
(t (error "Bad string expansion"))))
(defconst preview-expandable-string
- (funcall
- (lambda (f) (funcall f (funcall f 'sexp)))
- (lambda (x)
- `(choice
- string
- (repeat :tag "Concatenate"
- (choice
- string
- (cons :tag "Separated list"
- (choice (string :tag "Separator")
- (symbol :tag "Indirect separator or flag"))
- ,x)
- (symbol :tag "Indirect variable (no separator)")))
- (symbol :tag "Indirect variable (with separator)"))))
+ (let ((f (lambda (x)
+ `(choice
+ string
+ (repeat :tag "Concatenate"
+ (choice
+ string
+ (cons :tag "Separated list"
+ (choice (string :tag "Separator")
+ (symbol :tag
+ "Indirect separator or flag"))
+ ,x)
+ (symbol :tag "Indirect variable (no separator)")))
+ (symbol :tag "Indirect variable (with separator)")))))
+ (funcall f (funcall f 'sexp)))
"Type to be used for `preview-string-expand'.
Just a hack until we get to learn how to do this properly.
Recursive definitions are not popular with Emacs,
@@ -1158,7 +1158,7 @@ Place point at POSITION, else beginning of file."
(let ((default-major-mode
(or
(assoc-default "x.ps" auto-mode-alist #'string-match)
- default-major-mode))
+ (default-value 'major-mode)))
(buff (get-file-buffer file)))
(save-excursion
(if buff
@@ -2268,8 +2268,7 @@ See description of `TeX-command-list' for details."
(defun preview-copy-text (ov)
"Copy the text of OV into the kill buffer."
- (save-excursion
- (set-buffer (overlay-buffer ov))
+ (with-current-buffer (overlay-buffer ov)
(copy-region-as-kill (overlay-start ov) (overlay-end ov))))
(defun preview-copy-mml (ov)
@@ -2666,7 +2665,7 @@ call, and in its CDR the final stuff for the placement
hook."
(lsnippet 0) lstart (lfile "") lline lbuffer lpoint
lcounters
string after-string error context-start
- context offset
+ offset
parsestate (case-fold-search nil)
(run-buffer (current-buffer))
(run-coding-system preview-coding-system)
@@ -2695,39 +2694,39 @@ call, and in its CDR the final stuff for the placement
hook."
!\\(?:offset(\\([---0-9]+\\))\\|\
name(\\([^)]+\\))\\)\\|\
^Preview: \\([a-zA-Z]+\\) \\([^\n\r]*\\)\r?$" nil t)
-;;; Ok, here is a line by line breakdown:
-;;; match-alternative 1:
-;;; error indicator for TeX error, either style.
-;;; match-alternative 2:
-;;; The same, but file-line-error-style, matching on file name.
-;;; match-alternative 3:
-;;; Too ugly to describe in detail. In short, we try to catch file
-;;; names built from path components that don't contain spaces or
-;;; other special characters once the file extension has started.
+;;; Ok, here is a line by line breakdown:
+;;; match-alternative 1:
+;;; error indicator for TeX error, either style.
+;;; match-alternative 2:
+;;; The same, but file-line-error-style, matching on file name.
+;;; match-alternative 3:
+;;; Too ugly to describe in detail. In short, we try to catch file
+;;; names built from path components that don't contain spaces or
+;;; other special characters once the file extension has started.
;;;
-;;; Position for searching immediately after the file name so as to
-;;; not miss closing parens or something.
-;;; (match-string 3) is the file name.
-;;; match-alternative 4:
-;;; )+\( \|$\)
-;;; a closing paren followed by the end of line or a space: a just
-;;; closed file.
-;;; match-alternative 5 (wrapped into one shy group with
-;;; match-alternative 6, so that the match on first char is slightly
-;;; faster):
-;;; !offset(\([---0-9]+\))
-;;; an AUCTeX offset message. (match-string 5) is the offset itself
-;;; !name(\([^)]+\))
-;;; an AUCTeX file name message. (match-string 6) is the file name
-;;; TODO: Actually, the latter two should probably again match only
-;;; after a space or newline, since that it what \message produces.
-;;;disabled in prauctex.def:
-;;;\(?:Ov\|Und\)erfull \\.*[0-9]*--[0-9]*
-;;;\(?:.\{79\}
-;;;\)*.*$\)\|
-;;; This would have caught overfull box messages that consist of
-;;; several lines of context all with 79 characters in length except
-;;; of the last one. prauctex.def kills all such messages.
+;;; Position for searching immediately after the file name so as to
+;;; not miss closing parens or something.
+;;; (match-string 3) is the file name.
+;;; match-alternative 4:
+;;; )+\( \|$\)
+;;; a closing paren followed by the end of line or a space: a just
+;;; closed file.
+;;; match-alternative 5 (wrapped into one shy group with
+;;; match-alternative 6, so that the match on first char is slightly
+;;; faster):
+;;; !offset(\([---0-9]+\))
+;;; an AUCTeX offset message. (match-string 5) is the offset itself
+;;; !name(\([^)]+\))
+;;; an AUCTeX file name message. (match-string 6) is the file name
+;;; TODO: Actually, the latter two should probably again match only
+;;; after a space or newline, since that it what \message produces.
+;;; disabled in prauctex.def:
+;;; \(?:Ov\|Und\)erfull \\.*[0-9]*--[0-9]*
+;;; \(?:.\{79\}
+;;; \)*.*$\)\|
+;;; This would have caught overfull box messages that consist of
+;;; several lines of context all with 79 characters in length except
+;;; of the last one. prauctex.def kills all such messages.
(setq file (match-string-no-properties 2))
(cond
((match-beginning 1)
@@ -2763,9 +2762,9 @@ name(\\([^)]+\\))\\)\\|\
context-start (point)
;; And the line number to position the cursor.
-;;; variant 1: profiling seems to indicate the regexp-heavy solution
-;;; to be favorable. Removing incomplete characters from the error
-;;; context is an absolute nuisance.
+;;; variant 1: profiling seems to indicate the regexp-heavy solution
+;;; to be favorable. Removing incomplete characters from the error
+;;; context is an absolute nuisance.
line (and (re-search-forward "\
^l\\.\\([0-9]+\\) \\(\\.\\.\\.\\(?:\\^*\\(?:[89a-f][0-9a-f]\\|[]@-\\_?]\\)\\|\
\[0-9a-f]?\\)\\)?\\([^\n\r]*?\\)\r?
@@ -2805,11 +2804,12 @@ name(\\([^)]+\\))\\)\\|\
(setq slow-hook
(nconc slow-hook (list lst)))))))
(condition-case err
- (save-excursion (run-hooks 'slow-hook))
+ (save-excursion (mapc #'funcall slow-hook))
(error (preview-log-error err "Translation hook")))
(push (vector file (+ line offset)
string after-string
- snippet box counters) parsestate)))
+ snippet box counters)
+ parsestate)))
;; else normal error message
(forward-line)
(re-search-forward "^l\\.[0-9]" nil t)
@@ -2906,7 +2906,8 @@ name(\\([^)]+\\))\\)\\|\
'end
(- line lline))
(forward-line (- line lline)))))
- (goto-line line))
+ (goto-char (point-min))
+ (forward-line (1- line)))
(setq lpoint (point))
(cond
((search-forward (concat string after-string)
diff --git a/prv-install.el b/prv-install.el
index 52cba8ff..158be5a8 100644
--- a/prv-install.el
+++ b/prv-install.el
@@ -1,6 +1,6 @@
;;; prv-install.el --- Complicated install-time magic for preview-latex.
-;; Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2005, 2014 Free Software Foundation, Inc.
;; Author: David Kastrup
;; Keywords: convenience, tex, wp
@@ -105,7 +105,7 @@ package name, and version (to be evaluated), followed by a
file to append."
(fset 'message si:message))
(while (setq append-file (pop command-line-args-left))
(when (file-exists-p generated-autoload-file)
- (with-temp-buffer (insert-file append-file)
+ (with-temp-buffer (insert-file-contents append-file)
(append-to-file (point-min) (point-max)
generated-autoload-file))))
(byte-compile-file generated-autoload-file)))
diff --git a/style/AnonymousPro.el b/style/AnonymousPro.el
new file mode 100644
index 00000000..5ca3203d
--- /dev/null
+++ b/style/AnonymousPro.el
@@ -0,0 +1,90 @@
+;;; AnonymousPro.el --- AUCTeX style for `AnonymousPro.sty' (v2.1)
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-10-30
+;; Keywords: tex
+
+;; 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, 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 file adds support for `AnonymousPro.sty' (v2.1) from
+;; 2014/03/22. `AnonymousPro.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "AnonymousPro"
+ (lambda ()
+
+ ;; Run style hook for textcomp
+ (TeX-run-style-hooks "textcomp")
+
+ ;; New symbols
+ (TeX-add-symbols
+ "ANPapplelogo"
+ "ANPappleopen"
+ "ANPapproxequal"
+ "ANPback"
+ "ANPblackdiamond"
+ "ANPcheckmark"
+ "ANPcopy"
+ "ANPellipsis"
+ "ANPendtab"
+ "ANPerasetotheright"
+ "ANPgreaterequal"
+ "ANPHbar"
+ "ANPhbar"
+ "ANPinfinity"
+ "ANPinsert"
+ "ANPintegral"
+ "ANPlessequal"
+ "ANPlozenge"
+ "ANPnotequal"
+ "ANPoptionkey"
+ "ANPpartialdiff"
+ "ANPPi"
+ "ANPpi"
+ "ANPproduct"
+ "ANPshift"
+ "ANPshiftlock"
+ "ANPSigma"
+ "ANPsigma"
+ "ANPsigmaone"
+ "ANPsummation"
+ "ANPtab"
+ "ANPReturnSign"
+ "ANPShoulderedOpenBox"
+ "ANPUpArrowHead"
+ "ANPInsertSign"
+ "ANPUpArrowHeadBars"
+ "ANPHelm"
+ "ANPOpenBox"
+ "ANPDelta"
+ "ANPverticaltab"
+ "ANPNumeroSign"))
+ LaTeX-dialect)
+
+(defvar LaTeX-AnonymousPro-package-options
+ '("ttdefault" "scale")
+ "Package options for the AnonymousPro package.")
+
+;;; AnonymousPro.el ends here
diff --git a/style/CJK.el b/style/CJK.el
index f21d1a93..c63ceb77 100644
--- a/style/CJK.el
+++ b/style/CJK.el
@@ -1,6 +1,6 @@
;;; CJK.el --- AUCTeX style for the CJK package.
-;; Copyright (C) 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2014 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
@@ -46,11 +46,11 @@ The function can be used for CJK and CJK* environments."
(LaTeX-insert-environment
env
(concat
- (let ((font-enc (read-string "(Optional) Font encoding: ")))
+ (let ((font-enc (TeX-read-string "(Optional) Font encoding: ")))
(unless (zerop (length font-enc)) (format "[%s]" font-enc)))
(format "{%s}" (completing-read "Encoding: "
(mapcar 'list LaTeX-CJK-enc-list)))
- (format "{%s}" (read-string "Font family: ")))))
+ (format "{%s}" (TeX-read-string "Font family: ")))))
(TeX-add-style-hook
"CJK"
diff --git a/style/MinionPro.el b/style/MinionPro.el
index 34419115..75dc931a 100644
--- a/style/MinionPro.el
+++ b/style/MinionPro.el
@@ -1,6 +1,6 @@
;;; MinionPro.el -- AUCTeX style for MinionPro.sty
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2014 Free Software Foundation, Inc.
;; Author: Mark Trettin <Mark.Trettin@gmx.de>
;; Maintainer: auctex-devel@gnu.org
@@ -26,39 +26,30 @@
;;; Commentary:
-;; This file adds support for `MinionPro.sty' (v2.0).
+;; This file adds support for `MinionPro.sty' (v2.3) from 2012/08/03.
+;; The latest version of MinionPro is available as part of FontPro
+;; bundle from <https://www.github.com/sebschub>.
-;;; Code
+;;; Code:
(TeX-add-style-hook
"MinionPro"
(lambda ()
+
+ ;; New symbols
(TeX-add-symbols
- ;; New symbols
- '("figureversion"
- (TeX-arg-eval completing-read "Figure style: "
- '(("text") ("osf")
- ("lining") ("lf")
- ("tabular") ("tab")
- ("proportional") ("prop"))))
'("smallfrac" "Numerator" "Denominator")
- '("slantfrac" "Numerator" "Denominator")
- ;; IMHO they should be added to the other \text.. and \..shape commands
- '("textsw" 1)
- '("textssc" 1)
- "sscshape"
- "swshape")
+ '("slantfrac" "Numerator" "Denominator"))
+
;; Run style hook for amsmath which is loaded via MnSymbol
- (TeX-run-style-hooks "amsmath")
+ (TeX-run-style-hooks "amsmath" "fontaxes" "textcomp")
+
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("smallfrac" "{{")
- ("slantfrac" "{{")
- ("textsw" "{")
- ("textssc" "{"))
- 'textual)
- (font-latex-add-keywords '(("figureversion" "{")) 'variable)))
+ ("slantfrac" "{{"))
+ 'textual)))
LaTeX-dialect)
(defvar LaTeX-MinionPro-package-options
@@ -66,7 +57,13 @@
"slides" "textosf" "mathosf" "osf" "textlf" "mathlf" "lf"
"mathtabular" "mnsy" "cmsy" "swash" "abx" "amsbb" "fourierbb"
"lucidabb" "mixedgreek" "italicgreek" "frenchmath" "minionint"
- "footnotefigures")
-"Package options for the MinionPro package.")
+ "footnotefigures"
+
+ ;; Additional options in v2.1
+ "onlytext" "onlymath" "loosequotes" "openg" "normalsize" "nonormalsize"
+
+ ;; Additional option in v2.2
+ "scale")
+ "Package options for the MinionPro package.")
;;; MinionPro.el ends here
diff --git a/style/MyriadPro.el b/style/MyriadPro.el
new file mode 100644
index 00000000..09feb1f5
--- /dev/null
+++ b/style/MyriadPro.el
@@ -0,0 +1,90 @@
+;;; MyriadPro.el --- AUCTeX style for `MyriadPro.sty' (v0.5)
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-10-21
+;; Keywords: tex
+
+;; 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, 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 file adds support for `MyriadPro.sty' (v0.5) from 2013/04/20.
+;; The latest version of MyriadPro is available as part of FontPro
+;; bundle from <https://www.github.com/sebschub>. `MyriadPro.sty' is
+;; not part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "MyriadPro"
+ (lambda ()
+
+ ;; Run style hook for various packages loaded by MyriadPro
+ (TeX-run-style-hooks "textcomp" "amsmath" "fontaxes" "mdsymbol")
+
+ ;; New symbols
+ (TeX-add-symbols
+ '("smallfrac" "Numerator" "Denominator")
+ '("slantfrac" "Numerator" "Denominator")
+ '("boldsymbol" "Symbol"))
+
+ ;; `\mathversion' is available with sansmath option
+ (when (LaTeX-provided-package-options-member "MyriadPro" "sansmath")
+ (TeX-add-symbols
+ '("mathversion"
+ (TeX-arg-eval completing-read "Math version: "
+ '(("sans") ("sansbold")
+ ("sanstabular") ("sansboldtabular"))))))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("smallfrac" "{{")
+ ("slantfrac" "{{"))
+ 'textual)
+ (font-latex-add-keywords '(("mathversion" "{"))
+ 'variable)))
+ LaTeX-dialect)
+
+(defvar LaTeX-MyriadPro-package-options
+ '(;; Font selection
+ "smallfamily" "medfamily" "onlytext" "onlymath" "math" "sansmath"
+
+ ;; Figure selection
+ "textosf" "mathosf" "osf" "textlf" "mathlf" "lf" "mathtabular"
+
+ ;; Calligraphic fonts
+ "cmsy" "swash" "abx"
+
+ ;; Blackboard bold letters
+ "amsbb" "fourierbb" "lucidabb"
+
+ ;; Greek letters
+ "mixedgreek" "italicgreek" "frenchmath"
+
+ ;; Miscellaneous options
+ "scale" "loosequotes" "footnotefigures"
+
+ ;; Additional mathversions
+ "sansmath")
+ "Package options for the MyriadPro package.")
+
+;;; MyriadPro.el ends here
diff --git a/style/XCharter.el b/style/XCharter.el
new file mode 100644
index 00000000..df88f977
--- /dev/null
+++ b/style/XCharter.el
@@ -0,0 +1,76 @@
+;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.05)
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-10-30
+;; Keywords: tex
+
+;; 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, 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 file adds support for `XCharter.sty' (v1.05) from 2014/07/03.
+;; `XCharter.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "XCharter"
+ (lambda ()
+
+ ;; Run style hook for various packages loaded by XCharter
+ (TeX-run-style-hooks "textcomp" "fontaxes")
+
+ ;; New symbols
+ (TeX-add-symbols
+
+ ;; Only preamble commands
+ '("useosf" 0)
+ '("useosfI" 0)
+
+ ;; Text commands
+ '("textsu" t) ; superior figures
+ '("sustyle" -1) ;
+ '("textlf" t) ; lining figures
+ '("lfstyle" -1) ;
+ '("textosf" t) ; oldstyle figures
+ '("textosfI" t) ; oldstyle figures alternate
+ '("osfstyle" -1)) ; whatever oldstyle option is in force
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("textsu" "{")
+ ("textlf" "{")
+ ("textosf" "{")
+ ("textosfI" "{"))
+ 'type-command)
+ (font-latex-add-keywords '(("sustyle" "")
+ ("lfstyle" "")
+ ("osfstyle" ""))
+ 'type-declaration)))
+ LaTeX-dialect)
+
+(defvar LaTeX-XCharter-package-options
+ '("lining" "lf" "oldstyle" "osf" "oldstyleI" "osfI"
+ "scaled" "sups")
+ "Package options for the XCharter package.")
+
+;;; XCharter.el ends here
diff --git a/style/amsmath.el b/style/amsmath.el
index 0326561b..6daec4e0 100644
--- a/style/amsmath.el
+++ b/style/amsmath.el
@@ -163,15 +163,15 @@
(defun LaTeX-amsmath-env-alignat (env)
"Insert ENV with column number specifications.
Insert suitable number of ampersands also if possible."
- (let ((ncols (read-string "Number of columns: ")))
+ (let ((ncols (TeX-read-string "Number of columns: ")))
(LaTeX-insert-environment env (concat TeX-grop ncols TeX-grcl))
(LaTeX-item-equation-alignat t)))
(defun LaTeX-amsmath-env-alignedat (env)
"Insert ENV with position and column number specifications.
Insert suitable number of ampersands also if possible."
- (let ((where (read-string "(Optional) Vertical position (t or b): "))
- (ncols (read-string "Number of columns: ")))
+ (let ((where (TeX-read-string "(Optional) Vertical position (t or b): "))
+ (ncols (TeX-read-string "Number of columns: ")))
(unless (string= where "")
(setq where (concat LaTeX-optop where LaTeX-optcl)))
(LaTeX-insert-environment env (concat where TeX-grop ncols TeX-grcl))
diff --git a/style/amsthm.el b/style/amsthm.el
index 15cbf3a2..57f2315c 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -1,6 +1,6 @@
;;; amsthm.el --- Style hook for the AMS-LaTeX amsthm package.
-;; Copyright (C) 1997, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2013, 2014 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
;; Maintainer: auctex-devel@gnu.org
@@ -34,7 +34,7 @@
'("proof" (lambda (env &rest ignore)
(LaTeX-insert-environment
env
- (let ((heading (read-string "(optional) Heading: ")))
+ (let ((heading (TeX-read-string "(optional) Heading: ")))
(if (string= heading "")
""
(format "[%s]" heading))))))
diff --git a/style/beamer.el b/style/beamer.el
index c108f2b7..9b18c07b 100644
--- a/style/beamer.el
+++ b/style/beamer.el
@@ -1,6 +1,6 @@
;;; beamer.el --- AUCTeX style for the latex-beamer class
-;; Copyright (C) 2003, 2004, 2005, 2008, 2013 Free Software Foundation
+;; Copyright (C) 2003, 2004, 2005, 2008, 2013, 2014 Free Software Foundation
;; Author: Thomas Baumann <thomas.baumann@ch.tum.de>
;; Created: 2003-12-20
@@ -87,7 +87,7 @@
'("beamerskipbutton" 1)
'("frame" TeX-arg-beamer-frametitle)
'("frametitle"
- (TeX-arg-eval read-string "Title: " nil
'LaTeX-beamer-frametitle-history))
+ (TeX-arg-eval TeX-read-string "Title: " nil
'LaTeX-beamer-frametitle-history))
'("hyperlink" TeX-arg-beamer-overlay-spec 2)
'("hyperlinkslideprev" TeX-arg-beamer-overlay-spec 1)
'("hyperlinkslidenext" TeX-arg-beamer-overlay-spec 1)
@@ -130,13 +130,13 @@
'("beamerboxesrounded" 1)
'("block" (lambda (env &rest ignore)
(LaTeX-insert-environment
- env (format "{%s}" (read-string "Title: ")))))
+ env (format "{%s}" (TeX-read-string "Title: ")))))
'("column" "Width")
"columns"
"columnsonlytextwidth"
'("exampleblock" 1)
'("frame" (lambda (env &rest ignore)
- (let ((title (read-string "(Optional) Title: " nil
+ (let ((title (TeX-read-string "(Optional) Title: " nil
'LaTeX-beamer-frametitle-history)))
(LaTeX-insert-environment env)
(unless (zerop (length title))
@@ -152,14 +152,14 @@
'("onlyenv" (lambda (env &rest ignore)
(LaTeX-insert-environment
env
- (let ((overlay (read-string "(Optional) Overlay: ")))
+ (let ((overlay (TeX-read-string "(Optional) Overlay: ")))
(unless (zerop (length overlay))
(format "<%s>" overlay))))))
'("overlayarea" "Area width" "Area height")
'("overprint" (lambda (env &rest ignore)
(LaTeX-insert-environment
env
- (let ((width (read-string "(Optional) Area width: ")))
+ (let ((width (TeX-read-string "(Optional) Area width: ")))
(unless (zerop (length width))
(format "[%s]" width))))))
"semiverbatim")
@@ -192,14 +192,14 @@
(defun TeX-arg-beamer-overlay-spec (optional &optional prompt)
"Prompt for overlay specification."
- (let ((overlay (read-string "(Optional) Overlay: ")))
+ (let ((overlay (TeX-read-string "(Optional) Overlay: ")))
(unless (zerop (length overlay))
(insert "<" overlay ">"))
(indent-according-to-mode)))
(defun TeX-arg-beamer-frametitle (optional &optional prompt)
"Prompt for the frametitle."
- (let ((title (read-string "Title: " nil 'LaTeX-beamer-frametitle-history)))
+ (let ((title (TeX-read-string "Title: " nil
'LaTeX-beamer-frametitle-history)))
(if (not (zerop (length title)))
(insert TeX-grop TeX-esc "frametitle" TeX-grop
title TeX-grcl TeX-grcl)
@@ -223,8 +223,8 @@ unconditionally."
(defun TeX-arg-beamer-note (optional &optional prompt)
"Prompt for overlay specification and optional argument."
- (let ((overlay (read-string "(Optional) Overlay: "))
- (options (read-string "(Optional) Options: ")))
+ (let ((overlay (TeX-read-string "(Optional) Overlay: "))
+ (options (TeX-read-string "(Optional) Options: ")))
(unless (zerop (length overlay))
(insert "<" overlay ">"))
(unless (zerop (length options))
diff --git a/style/book.el b/style/book.el
index cbc98139..c9571cb2 100644
--- a/style/book.el
+++ b/style/book.el
@@ -11,8 +11,8 @@
(TeX-add-style-hook
"book"
- (lambda ()
- (LaTeX-largest-level-set "chapter")
+ (lambda ()
+ (LaTeX-largest-level-set "part")
(LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection"
"paragraph" "subparagraph" "figure" "table")
(LaTeX-add-pagestyles "headings" "myheadings"))
diff --git a/style/csquotes.el b/style/csquotes.el
index fd112f88..e4b156dc 100644
--- a/style/csquotes.el
+++ b/style/csquotes.el
@@ -1,6 +1,6 @@
;;; csquotes.el --- AUCTeX style for `csquotes.sty'
-;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006, 2014 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
@@ -57,7 +57,7 @@ the insertion of optional arguments."
optional t)
(setq prompt elt
optional nil))
- (setq user-input (read-string (TeX-argument-prompt optional prompt nil)))
+ (setq user-input (TeX-read-string (TeX-argument-prompt optional prompt
nil)))
(unless (and optional (zerop (length user-input)))
(setq env-extra (concat env-extra
(if optional LaTeX-optop TeX-grop)
diff --git a/style/dinbrief.el b/style/dinbrief.el
index d1149c16..9506d15f 100644
--- a/style/dinbrief.el
+++ b/style/dinbrief.el
@@ -96,18 +96,18 @@
"Insert ENVIRONMENT and prompt for recipient and address."
(let (
(sender (LaTeX-dinbrief-sender))
- (recipient (read-string "Empfänger: "))
+ (recipient (TeX-read-string "Empfänger: "))
(address (LaTeX-dinbrief-recipient))
- (date (read-string "Datum: " (LaTeX-dinbrief-today)))
- (postremark (read-string "Postvermerk: "))
- (fenster (read-string "Fenster \(ja/nein\): "))
- (vermerk (read-string "Behandlungsvermerk: "))
- (verteil (read-string "Verteiler: "))
- (betreff (read-string "Betreff: "))
- (opening (read-string "Anrede: "))
- (closing (read-string "Schluss: "))
- (signature (read-string "Unterschrift: "))
- (anlage (read-string "Anlagen: ")))
+ (date (TeX-read-string "Datum: " (LaTeX-dinbrief-today)))
+ (postremark (TeX-read-string "Postvermerk: "))
+ (fenster (TeX-read-string "Fenster \(ja/nein\): "))
+ (vermerk (TeX-read-string "Behandlungsvermerk: "))
+ (verteil (TeX-read-string "Verteiler: "))
+ (betreff (TeX-read-string "Betreff: "))
+ (opening (TeX-read-string "Anrede: "))
+ (closing (TeX-read-string "Schluss: "))
+ (signature (TeX-read-string "Unterschrift: "))
+ (anlage (TeX-read-string "Anlagen: ")))
(if (string= fenster "ja")
(progn
@@ -119,7 +119,7 @@
(newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "windowtics")
(newline-and-indent)
- (let ((retouradr (read-string "Retouradresse: " sender)))
+ (let ((retouradr (TeX-read-string "Retouradresse: " sender)))
(newline-and-indent)
(if (not (zerop (length retouradr)))
(progn
@@ -208,9 +208,9 @@
(defun LaTeX-dinbrief-sender ()
"Read and write the senders address."
(interactive)
- (let ((name (read-string "Absender: " (user-full-name)))
- (str (read-string "Meine Strasse: "))
- (ort (read-string "Mein Wohnort: ")))
+ (let ((name (TeX-read-string "Absender: " (user-full-name)))
+ (str (TeX-read-string "Meine Strasse: "))
+ (ort (TeX-read-string "Mein Wohnort: ")))
(if (not (zerop (length name)))
(progn
(goto-char (point-min)) ; insert before \end{document}
@@ -235,8 +235,8 @@
(defun LaTeX-dinbrief-recipient ()
"Read and return the recipient address."
(interactive)
- (let ((str (read-string "Wohnhaft in Strasse: "))
- (ort (read-string "Aus der Ortschaft: ")))
+ (let ((str (TeX-read-string "Wohnhaft in Strasse: "))
+ (ort (TeX-read-string "Aus der Ortschaft: ")))
(if (not (zerop (length str)))
(if (not (zerop (length ort)))
(concat str " " TeX-esc TeX-esc " " ort)
@@ -266,7 +266,7 @@
(let ((year (substring ctime-string (match-beginning 3) (match-end 3)))
(month (substring ctime-string (match-beginning 1) (match-end 1)))
(day (substring ctime-string (match-beginning 2) (match-end 2)))
- (place (read-string "Heutiger Ort: ")))
+ (place (TeX-read-string "Heutiger Ort: ")))
(if (assoc month month-alist)
(progn
(setq month (cdr (assoc month month-alist)))
diff --git a/style/dk-bib.el b/style/dk-bib.el
index 2ae7530a..63c8d3fb 100644
--- a/style/dk-bib.el
+++ b/style/dk-bib.el
@@ -1,6 +1,6 @@
;;; dk-bib.el --- AUCTeX style for `dk-bib.sty'
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2014 Free Software Foundation, Inc.
;; Author: Arne J�rgensen <arne@arnested.dk>
;; Keywords: tex
@@ -44,7 +44,7 @@
(> depth 20))
(setq depth (if (fboundp 'read-number)
(read-number "Ordinal depth: ")
- (string-to-number (read-string "Ordinal depth: "))))
+ (string-to-number (TeX-read-string "Ordinal depth: "))))
(when (or (< depth 0)
(> depth 20))
(message "Ordinal depth must be between 0 and 20")
diff --git a/style/emp.el b/style/emp.el
index 16400eed..04016673 100644
--- a/style/emp.el
+++ b/style/emp.el
@@ -1,6 +1,6 @@
;;; emp.el --- AUCTeX support for emp.sty
-;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2014 Free Software Foundation, Inc.
;; Author: Yvon Henel aka TeXnicien de surface <Yvon.Henel@wanadoo.fr>
;; Maintainer: auctex-devel@gnu.org
@@ -44,16 +44,16 @@
(defun LaTeX-env-emp-gen (environment-name)
"Ask for file, width and length. Insert environment-name environment
Used for emp, empdef, and empgraph environments."
- (let ((emp-fig-name (read-string "figure name: " ""))
- (emp-fig-width (read-string "figure width: " "1" ))
- (emp-fig-height (read-string "figure height: " "1" ))
+ (let ((emp-fig-name (TeX-read-string "figure name: " ""))
+ (emp-fig-width (TeX-read-string "figure width: " "1" ))
+ (emp-fig-height (TeX-read-string "figure height: " "1" ))
;;; emp.sty demands a width and a height for each of the
;;; emp, empdef, and empgraph environments
;;; we give them 1 by default
;;; not necessarily the best thing to do?
)
(if (not (zerop (length emp-fig-name)))
- (progn
+ (progn
(setq LaTeX-emp-fig-name (concat LaTeX-optop emp-fig-name
LaTeX-optcl))
(LaTeX-insert-environment environment-name LaTeX-emp-fig-name))
(LaTeX-insert-environment environment-name))
@@ -66,9 +66,9 @@ Used for emp, empdef, and empgraph environments."
(defun LaTeX-env-empfile (optional)
"Ask for file. Insert empfile environment"
- (let ((empfile (read-string "empfile: " "")))
+ (let ((empfile (TeX-read-string "empfile: " "")))
(if (not (zerop (length empfile)))
- (progn
+ (progn
(setq LaTeX-emp-file-name (concat LaTeX-optop empfile LaTeX-optcl))
(setq mpost-emp-file-name (concat empfile ".mp"))
(LaTeX-insert-environment "empfile" LaTeX-emp-file-name))
diff --git a/style/epsf.el b/style/epsf.el
index cddd122b..52191c87 100644
--- a/style/epsf.el
+++ b/style/epsf.el
@@ -3,8 +3,10 @@
;; Copyright (C) 2013 Free Software Foundation, Inc.
;; Contributed by Marc Gemis <makke@wins.uia.ac.be>
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+;; FIXME: What about the copyright for <= 2014?
-;;; Code:
+;;; Code:
(TeX-add-style-hook
"epsf"
@@ -22,7 +24,7 @@
(defun TeX-arg-epsfsize (optional &optional prompt definition)
"Create a line that print epsf figures at a certain percentage"
(interactive)
- (let ((scale (read-string "Scale in percent (default 75): ")))
+ (let ((scale (TeX-read-string "Scale in percent (default 75): ")))
(setq scale (if (zerop (length scale)) "75" scale))
(save-excursion
; append #1#{scale#1}
diff --git a/style/eso-pic.el b/style/eso-pic.el
new file mode 100644
index 00000000..8b435355
--- /dev/null
+++ b/style/eso-pic.el
@@ -0,0 +1,91 @@
+;;; eso-pic.el --- AUCTeX style for `eso-pic.sty' (v2.0d)
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-10-29
+;; Keywords: tex
+
+;; 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, 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 file adds support for `eso-pic.sty' (v2.0d) from 2013/10/06.
+;; `eso-pic.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "eso-pic"
+ (lambda ()
+
+ ;; Run style hook for eso-pic
+ (TeX-run-style-hooks "atbegshi")
+
+ ;; New symbols
+ (TeX-add-symbols
+
+ ;; Basic commands
+ '("AddToShipoutPictureBG" t)
+ '("AddToShipoutPictureBG*" t)
+ '("AddToShipoutPictureFG" t)
+ '("AddToShipoutPictureFG*" t)
+ '("ClearShipoutPictureBG" 0)
+ '("ClearShipoutPictureFG" 0)
+
+ ;; Helper macros
+ '("AtPageUpperLeft" t)
+ '("AtPageLowerLeft" t)
+ '("AtPageCenter" t)
+ '("AtTextUpperLeft" t)
+ '("AtTextLowerLeft" t)
+ '("AtTextCenter" t)
+ '("AtStockUpperLeft" t)
+ '("AtStockLowerLeft" t)
+ '("AtStockCenter" t)
+
+ ;; Aux. commands
+ '("LenToUnit" t)
+ '("gridSetup"
+ [ "Grid unit name" ] "Grid unit" "Label factor"
+ "Grid delta" "Grid Delta" "Gap"))
+
+ ;; Declare expert macro
+ (TeX-declare-expert-macros
+ "eso-pic"
+ "gridSetup" "LenToUnit"))
+ LaTeX-dialect)
+
+(defvar LaTeX-eso-pic-package-options
+ '(;;
+ ("pscoord" ("true" "false"))
+ ("texcoord" ("true" "false"))
+ ("grid" ("true" "false"))
+ ("gridunit" ("mm" "in" "bp" "pt"))
+ ("gridcolor")
+ ("subgridcolor")
+ ("subgridstyle" ("solid" "dotted"))
+ ("dvips" ("true" "false")))
+ "Package options for the eso-pic package.")
+
+(defun LaTeX-eso-pic-package-options nil
+ "Prompt for package options for the eso-pic package."
+ (TeX-read-key-val t LaTeX-eso-pic-package-options))
+
+;;; eso-pic.el ends here
diff --git a/style/filecontents.el b/style/filecontents.el
index ea3c60a4..493b6c7a 100644
--- a/style/filecontents.el
+++ b/style/filecontents.el
@@ -1,6 +1,6 @@
;;; filecontents.el --- AUCTeX style for `filecontents.sty'
-;; Copyright (C) 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2014 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Maintainer: auctex-devel@gnu.org
@@ -45,7 +45,7 @@
"Insert ENVIRONMENT with filename for contents."
(LaTeX-insert-environment environment
(concat TeX-grop
- (read-string "File: ")
+ (TeX-read-string "File: ")
TeX-grcl))
(delete-horizontal-space))
diff --git a/style/foils.el b/style/foils.el
index e3fedd80..d4500906 100644
--- a/style/foils.el
+++ b/style/foils.el
@@ -1,5 +1,26 @@
;;; foils.el - Special code for FoilTeX.
+;; Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
+;; Maintainer: auctex-devel@gnu.org
+;; Keywords: tex
+
+;; 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, 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. If not, see <http://www.gnu.org/licenses/>.
+
;;; Code:
(require 'timezone)
@@ -20,7 +41,7 @@
(year (string-to-number (aref date 0)))
(month (string-to-number (aref date 1)))
(day (string-to-number (aref date 2)))
- (title (read-string "Title: ")))
+ (title (TeX-read-string "Title: ")))
(save-excursion
(goto-char (point-max))
(re-search-backward ".begin.document.")
diff --git a/style/fontaxes.el b/style/fontaxes.el
new file mode 100644
index 00000000..95dafb4e
--- /dev/null
+++ b/style/fontaxes.el
@@ -0,0 +1,114 @@
+;;; fontaxes.el --- AUCTeX style for `fontaxes.sty' version v1.0d
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-10-12
+;; Keywords: tex
+
+;; 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, 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 file adds support for `fontaxes.sty' version v1.0d from
+;; 2014/03/23. `fontaxes.sty' is part of TeXLive.
+
+;; Thanks to Mos� Giordano for his perceptive comments on
+;; implementation of "figureversion".
+
+;;; Code:
+
+(TeX-add-style-hook
+ "fontaxes"
+ (lambda ()
+ (TeX-add-symbols
+ ;; Various font shapes
+ '("swshape" -1) ; swash shape
+ '("sscshape" -1) ; spaced small caps
+ '("fontprimaryshape" t)
+ '("fontsecondaryshape" t)
+ '("swdefault" t)
+ '("sscdefault" t)
+ '("ulcdefault" t)
+
+ ;; Figure versions
+ '("figureversion"
+ (TeX-arg-eval mapconcat 'identity
+ (TeX-completing-read-multiple
+ "Style, alignment: "
+ '(("text") ("osf")
+ ("lining") ("lf")
+ ("tabular") ("tab")
+ ("proportional") ("prop"))) ","))
+ '("txfigures" -1) ; style: text figures (osf)
+ '("lnfigures" -1) ; style: lining figures
+ '("tbfigures" -1) ; alignment: tabular figures
+ '("prfigures" -1) ; alignment: proportional figures
+ '("fontfigurestyle"
+ (TeX-arg-eval completing-read "Style: "
+ '(("text") ("lining"))))
+ '("fontfigurealignment"
+ (TeX-arg-eval completing-read "Alignment: "
+ '(("tabular") ("proportional"))))
+ '("fontbasefamily" t)
+
+ ;; Math versions
+ '("boldmath" -1) ; math weight
+ '("unboldmath" -1) ;
+ '("tabularmath" -1) ; math figure alignment
+ '("proportionalmath" -1) ;
+ '("mathweight"
+ (TeX-arg-eval completing-read "Math weight: "
+ '(("bold") ("normal"))))
+ '("mathfigurealignment"
+ (TeX-arg-eval completing-read "Math figure alignment: "
+ '(("tabular") ("proportional"))))
+
+ ;; Additional commands
+ '("textsw" t)
+ '("textssc" t)
+ '("textulc" t)
+ '("textfigures" t)
+ '("liningfigures" t)
+ '("tabularfigures" t)
+ '("proportionalfigures" t))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("textfigures" "{")
+ ("liningfigures" "{")
+ ("tabularfigures" "{")
+ ("proportionalfigures" "{"))
+ 'type-command)
+ (font-latex-add-keywords '(("textsw" "{")
+ ("textssc" "{")
+ ("textulc" "{"))
+ 'bold-command)
+ (font-latex-add-keywords '(("swshape" "")
+ ("sscshape" ""))
+ 'bold-declaration)
+ (font-latex-add-keywords '(("figureversion" "{"))
+ 'variable)))
+ LaTeX-dialect)
+
+(defvar LaTeX-fontaxes-package-options nil
+ "Package options for the fontaxes package.")
+
+;;; fontaxes.el ends here
diff --git a/style/fontspec.el b/style/fontspec.el
index c483d0ab..144b976c 100644
--- a/style/fontspec.el
+++ b/style/fontspec.el
@@ -213,8 +213,8 @@ to retrieve the list of fonts."
("setmainfont" "[{")
("setsansfont" "[{")
("setmonofont" "[{")
- ("newfontfamily" "{[{")
- ("newfontface" "{[{")
+ ("newfontfamily" "\\[{")
+ ("newfontface" "\\[{")
("setmathrm" "[{")
("setmathsf" "[{")
("setmathtt" "[{")
diff --git a/style/graphicx.el b/style/graphicx.el
index a06aabf6..7f66e527 100644
--- a/style/graphicx.el
+++ b/style/graphicx.el
@@ -1,6 +1,6 @@
;;; graphicx.el --- AUCTeX style file for graphicx.sty
-;; Copyright (C) 2000, 2004, 2005 by Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2004, 2005, 2014 by Free Software Foundation, Inc.
;; Author: Ryuichi Arafune <arafune@debian.org>
;; Created: 1999/3/20
@@ -123,19 +123,19 @@ The extent of the optional arguments is determined by the
prefix argument and
(totalheight
(TeX-arg-maybe
'totalheight incl-opts
- '(read-string
+ '(TeX-read-string
(concat "Total Height (" TeX-default-unit-for-image "): "))))
(height
(TeX-arg-maybe
'height incl-opts
;; Either totalheight or height make sense:
'(when (zerop (length totalheight))
- (read-string
+ (TeX-read-string
(concat "Figure height (" TeX-default-unit-for-image "): ")))))
(width
(TeX-arg-maybe
'width incl-opts
- '(read-string
+ '(TeX-read-string
(concat "Figure width (" TeX-default-unit-for-image "): "))))
(scale
(TeX-arg-maybe
@@ -144,22 +144,22 @@ The extent of the optional arguments is determined by the
prefix argument and
'(when (zerop (+ (length totalheight)
(length height)
(length width)))
- (read-string "Scale: "))))
+ (TeX-read-string "Scale: "))))
(angle
(TeX-arg-maybe
'angle incl-opts
- '(read-string "Rotation angle: ")))
+ '(TeX-read-string "Rotation angle: ")))
(origin
(TeX-arg-maybe
'origin incl-opts
- '(read-string
+ '(TeX-read-string
(concat
"Origin (any combination of `lcr' (horizontal) "
"and `tcbB' (vertical)): "))))
(page ;; Not in any table; Only for PDF.
(TeX-arg-maybe
'page incl-opts
- '(read-string "Page: ")))
+ '(TeX-read-string "Page: ")))
(bb
(TeX-arg-maybe
'bb incl-opts
@@ -236,29 +236,29 @@ The extent of the optional arguments is determined by the
prefix argument and
(setq maybe-comma ",")
(setq maybe-left-brace ""))
(when bb
- (setq llx (read-string "Bounding Box lower left x: "))
- (setq lly (read-string "Bounding Box lower left y: "))
- (setq urx (read-string "Bounding Box upper right x: "))
- (setq ury (read-string "Bounding Box upper right y: "))
+ (setq llx (TeX-read-string "Bounding Box lower left x: "))
+ (setq lly (TeX-read-string "Bounding Box lower left y: "))
+ (setq urx (TeX-read-string "Bounding Box upper right x: "))
+ (setq ury (TeX-read-string "Bounding Box upper right y: "))
(insert maybe-left-brace maybe-comma
"bb=" llx " " lly " " urx " " ury)
(setq maybe-comma ",")
(setq maybe-left-brace ""))
;;
(when viewport
- (setq llx (read-string "Viewport lower left x: "))
- (setq lly (read-string "Viewport lower left y: "))
- (setq urx (read-string "Viewport upper right x: "))
- (setq ury (read-string "Viewport upper right y: "))
+ (setq llx (TeX-read-string "Viewport lower left x: "))
+ (setq lly (TeX-read-string "Viewport lower left y: "))
+ (setq urx (TeX-read-string "Viewport upper right x: "))
+ (setq ury (TeX-read-string "Viewport upper right y: "))
(insert maybe-left-brace maybe-comma
"viewport=" llx " " lly " " urx " " ury)
(setq maybe-comma ",")
(setq maybe-left-brace ""))
(when trim
- (setq llx (read-string "Trim lower left x: "))
- (setq lly (read-string "Trim lower left y: "))
- (setq urx (read-string "Trim Upper right x: "))
- (setq ury (read-string "Trim Upper right y: "))
+ (setq llx (TeX-read-string "Trim lower left x: "))
+ (setq lly (TeX-read-string "Trim lower left y: "))
+ (setq urx (TeX-read-string "Trim Upper right x: "))
+ (setq ury (TeX-read-string "Trim Upper right y: "))
(insert maybe-left-brace maybe-comma
"trim=" llx " " lly " " urx " " ury)
(setq maybe-comma ",")
diff --git a/style/ifluatex.el b/style/ifluatex.el
new file mode 100644
index 00000000..48e1bd64
--- /dev/null
+++ b/style/ifluatex.el
@@ -0,0 +1,61 @@
+;;; ifluatex.el --- AUCTeX style for `ifluatex.sty' version 1.3.
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Davide G. M. Salvetti <salve@debian.org>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-11-15
+;; Keywords: tex
+
+;; 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, 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, see
+;; <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This file adds support for `ifluatex.sty' 1.3.
+
+;;; Code:
+
+(defun LaTeX-ifluatex-set-exit-mark (optional)
+ "Discard OPTIONAL and set exit-mark to current point."
+ (set-marker exit-mark (point)))
+
+(TeX-add-style-hook
+ "ifluatex"
+ (lambda ()
+ (TeX-add-symbols
+ '("ifluatex"
+ (TeX-arg-literal "%\n")
+ LaTeX-ifluatex-set-exit-mark
+ (TeX-arg-literal "\n\\else%\n\\fi%"))
+ '("luatexversion" 0)
+ '("luatexrevision" 0))
+
+ (TeX-declare-expert-macros
+ "ifluatex"
+ "ifluatex" "luatexversion" "luatexrevision")
+
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("luatexversion")
+ ("luatexrevision"))
+ 'function)))
+ LaTeX-dialect)
+
+(defvar LaTeX-ifluatex-package-options nil
+ "Package options for the ifluatex package.")
+
+;;; ifluatex.el ends here
diff --git a/style/inputenc.el b/style/inputenc.el
index 7d00ca74..e496cc66 100644
--- a/style/inputenc.el
+++ b/style/inputenc.el
@@ -1,6 +1,6 @@
;;; inputenc.el --- AUCTeX style for `inputenc.sty'
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2014 Free Software Foundation, Inc.
;; Author: Arne J�rgensen <arne@arnested.dk>
;; Keywords: tex
@@ -66,7 +66,7 @@
;; return selected input encoding
selected)))
- (read-string "Input encoding: ")))
+ (TeX-read-string "Input encoding: ")))
(defun LaTeX-arg-inputenc-inputenc (optional)
"Prompt for input encoding."
diff --git a/style/letter.el b/style/letter.el
index d02f8f4f..a4a5b385 100644
--- a/style/letter.el
+++ b/style/letter.el
@@ -1,6 +1,6 @@
;;; letter.el - Special code for letter style.
-;; Copyright (C) 1993, 2012, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2012, 2013, 2014 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Maintainer: auctex-devel@gnu.org
@@ -85,15 +85,15 @@
(defun LaTeX-env-recipient (environment)
"Insert ENVIRONMENT and prompt for recipient and address."
- (let ((sender (read-string "Sender: " (user-full-name)))
- (sender-address (read-string "Sender address: "
+ (let ((sender (TeX-read-string "Sender: " (user-full-name)))
+ (sender-address (TeX-read-string "Sender address: "
LaTeX-letter-sender-address))
- (recipient (read-string "Recipient: "))
- (address (read-string "Recipient address: "))
- (signature (read-string "Signature: "))
- (opening (read-string "Opening: "))
- (closing (read-string "Closing: "))
- (date (read-string "Date: " (LaTeX-today))))
+ (recipient (TeX-read-string "Recipient: "))
+ (address (TeX-read-string "Recipient address: "))
+ (signature (TeX-read-string "Signature: "))
+ (opening (TeX-read-string "Opening: "))
+ (closing (TeX-read-string "Closing: "))
+ (date (TeX-read-string "Date: " (LaTeX-today))))
(insert TeX-esc "name" TeX-grop sender TeX-grcl)
(newline-and-indent)
diff --git a/style/longtable.el b/style/longtable.el
index c0c7cf4f..353336dc 100644
--- a/style/longtable.el
+++ b/style/longtable.el
@@ -36,8 +36,8 @@
'("longtable" (lambda (environment)
(let ((pos (completing-read (TeX-argument-prompt t nil
"Position")
'(("l") ("r") ("c"))))
- (fmt (read-string "Format: " LaTeX-default-format))
- (caption (read-string "Caption: ")))
+ (fmt (TeX-read-string "Format: "
LaTeX-default-format))
+ (caption (TeX-read-string "Caption: ")))
(setq LaTeX-default-format fmt)
(LaTeX-insert-environment environment
(concat
diff --git a/style/luatextra.el b/style/luatextra.el
new file mode 100644
index 00000000..6dda1020
--- /dev/null
+++ b/style/luatextra.el
@@ -0,0 +1,44 @@
+;;; luatextra.el --- AUCTeX style for `luatextra.sty' version 1.0.
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Davide G. M. Salvetti <salve@debian.org>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-11-15
+;; Keywords: tex
+
+;; 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, 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, see
+;; <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This file adds support for `luatextra.sty' 1.0.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "luatextra"
+ (lambda ()
+ (TeX-run-style-hooks "ifluatex" "fontspec"
+ ;; FIXME: yet to be written:
+ ;; "luatexbase"
+ "metalogo" "luacode"))
+ LaTeX-dialect)
+
+(defvar LaTeX-luatextra-package-options nil
+ "Package options for the ifluatex package.")
+
+;;; luatextra.el ends here
diff --git a/style/mathtools.el b/style/mathtools.el
index ab4065bf..04ecc0dc 100644
--- a/style/mathtools.el
+++ b/style/mathtools.el
@@ -1,6 +1,6 @@
;;; mathtools.el --- Style hook for the LaTeX package `mathtools'.
-;; Copyright (C) 2011-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2012, 2014 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Created: 2011-02-13
@@ -170,22 +170,22 @@
LaTeX-dialect)
(defun LaTeX-mathtools-env-matrix-starred (env)
- (let ((where (read-string "(optional) Vertical placement of columns: ")))
+ (let ((where (TeX-read-string "(optional) Vertical placement of columns: ")))
(if (string= where "")
(setq where "")
(setq where (concat "[" where "]")))
(LaTeX-insert-environment env where)))
(defun LaTeX-mathtools-env-spreadlines (env)
- (let ((spread (read-string "Spacing between lines: ")))
+ (let ((spread (TeX-read-string "Spacing between lines: ")))
(LaTeX-insert-environment env (concat TeX-grop spread TeX-grcl))
(newline-and-indent)))
;; FIXME: there are probably more subtle ways to support more than one
;; optional argument; please change if this is the case
(defun LaTeX-mathtools-env-multlined (env)
- (let ((pos (read-string "(optional) Position: "))
- (width (read-string "(optional) Width: "))
+ (let ((pos (TeX-read-string "(optional) Position: "))
+ (width (TeX-read-string "(optional) Width: "))
(extra ""))
(if (not (string= pos ""))
(setq pos (concat LaTeX-optop pos LaTeX-optcl))
diff --git a/style/mdsymbol.el b/style/mdsymbol.el
new file mode 100644
index 00000000..b37729e4
--- /dev/null
+++ b/style/mdsymbol.el
@@ -0,0 +1,99 @@
+;;; mdsymbol.el --- AUCTeX style for `mdsymbol.sty' (v0.5)
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-10-25
+;; Keywords: tex
+
+;; 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, 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 file adds support for `mdsymbol.sty' (v0.5) from 2012/11/18.
+;; The latest version of is available from <https://www.github.com/sebschub>.
+;; `mdsymbol.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "mdsymbol"
+ (lambda ()
+
+ ;; Run style hook for various packages loaded by mdsymbol
+ (TeX-run-style-hooks "textcomp" "amsmath")
+
+ ;; New symbols
+ (TeX-add-symbols
+
+ ;; These macros take one argument; we follow latex.el and use the
+ ;; t specifier for the argument; over- and underbrace and sqrt are
+ ;; already available
+ '("overgroup" t)
+ '("undergroup" t)
+ '("overlinesegment" t)
+ '("overleftharpoon" t)
+ '("overrightharpoon" t)
+ '("underlinesegment" t)
+ ;;
+ '("widehat" t)
+ '("widetilde" t)
+ '("wideparen" t)
+ '("vec" t)
+ '("middlebar" t)
+ '("middleslash" t)
+ '("strokethrough" t)
+ ;;
+ '("overlining" t))
+
+ ;; The following macros are usually defined, since retainmissing
+ ;; defaults to false
+ (unless (or (LaTeX-provided-package-options-member "mdsymbol"
"retainmissing=true")
+ (LaTeX-provided-package-options-member "mdsymbol"
"retainmissing"))
+ (TeX-add-symbols
+ '("dagger")
+ '("ddagger")
+ '("mathparagraph")
+ '("mathsection")
+ '("mathdollar")
+ '("mathsterling")
+ '("yen")
+ '("hbar")
+ '("hslash")
+ '("circledR")
+ '("circledS")
+ '("lambdabar")
+ '("lambdaslash"))))
+ LaTeX-dialect)
+
+(defvar LaTeX-mdsymbol-package-options
+ '(;;
+ ("normalweight" ("Light" "Regular" "autolight" "autoregular"))
+ ("boldweight" ("Semibold" "Bold" "autosemibold"))
+ ("onlysansmath" ("true" "false"))
+ ("retainmissing" ("true" "false"))
+ ("scale")
+ ("largedelims" ("true" "false")))
+ "Package options for the mdsymbol package.")
+
+(defun LaTeX-mdsymbol-package-options nil
+ "Prompt for package options for the mdsymbol package."
+ (TeX-read-key-val t LaTeX-mdsymbol-package-options))
+
+;;; mdsymbol.el ends here
diff --git a/style/natbib.el b/style/natbib.el
index 522656ca..13cf2292 100644
--- a/style/natbib.el
+++ b/style/natbib.el
@@ -1,6 +1,6 @@
;;; natbib.el --- Style hook for the natbib package
-;; Copyright (C) 1997, 1998, 2004, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2004, 2007, 2014 Free Software Foundation, Inc.
;; Authors: Berwin Turlach <statba@nus.edu.sg>
;; Carsten Dominik <dominik@strw.leidenuniv.nl>
@@ -111,9 +111,9 @@
(defun natbib-note-args (optional &optional prompt definition)
"Prompt for two note arguments a natbib citation command."
(if TeX-arg-cite-note-p
- (let* ((pre (read-string
+ (let* ((pre (TeX-read-string
(TeX-argument-prompt optional optional "Pre-note")))
- (post (read-string
+ (post (TeX-read-string
(TeX-argument-prompt optional optional "Post-note"))))
(if (not (string= pre "")) (insert "[" pre "]"))
(if (not (string= post ""))
@@ -123,7 +123,7 @@
(defvar LaTeX-natbib-package-options '("numbers" "super" "authoryear"
"round" "square" "angle" "curly"
- "comma" "colon" "nobibstyle"
+ "comma" "colon" "nobibstyle"
"bibstyle" "openbib" "sectionbib"
"sort" "sort&compress"
"longnamesfirst" "nonamebreak")
diff --git a/style/paralist.el b/style/paralist.el
index e528de43..c9a70724 100644
--- a/style/paralist.el
+++ b/style/paralist.el
@@ -35,7 +35,7 @@
"Insert ENVIRONMENT, an optional label and the first item."
(LaTeX-insert-environment
environment
- (let ((label (read-string "(Optional) Label: ")))
+ (let ((label (TeX-read-string "(Optional) Label: ")))
(concat (unless (zerop (length label))
(format "[%s]" label)))))
(LaTeX-find-matching-begin)
diff --git a/style/plext.el b/style/plext.el
index 9afefc06..30765a79 100644
--- a/style/plext.el
+++ b/style/plext.el
@@ -50,13 +50,13 @@
LaTeX-dialect)
(defun LaTeX-plext-env-array (env)
- (let ((dir (read-string "(Optional) Direction (t or y or z): "))
+ (let ((dir (TeX-read-string "(Optional) Direction (t or y or z): "))
(width (if (string= env "tabular*")
- (read-string "Width: " LaTeX-default-width)))
+ (TeX-read-string "Width: " LaTeX-default-width)))
(pos (and LaTeX-default-position ; LaTeX-default-position can
; be nil, i.e. do not prompt
- (read-string "(Optional) Position: " LaTeX-default-position)))
- (fmt (read-string "Format: " LaTeX-default-format)))
+ (TeX-read-string "(Optional) Position: "
LaTeX-default-position)))
+ (fmt (TeX-read-string "Format: " LaTeX-default-format)))
(unless (zerop (length dir))
(setq dir (concat "<" dir ">")))
(if (string= env "tabular*")
diff --git a/style/prosper.el b/style/prosper.el
index 62373fc4..8974cecc 100644
--- a/style/prosper.el
+++ b/style/prosper.el
@@ -1,6 +1,6 @@
;;; prosper.el --- Prosper style file for AUCTeX
-;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2014 Free Software Foundation, Inc.
;; Authors: Phillip Lord<p.lord@russet.org.uk>
;; Nevin Kapur <nevin@jhu.edu>
@@ -138,7 +138,7 @@
(progn
(goto-char (+ 1 (point)))
(insert "%\n")))))
- (let ((title (read-string "Title: ")))
+ (let ((title (TeX-read-string "Title: ")))
(LaTeX-insert-environment "slide" (concat TeX-grop title TeX-grcl))))
diff --git a/style/psfig.el b/style/psfig.el
index 16945306..1165bea5 100644
--- a/style/psfig.el
+++ b/style/psfig.el
@@ -5,6 +5,9 @@
;; Contributed by Marc Gemis <makke@wins.uia.ac.be>
;; Please direct comments to him.
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+;; FIXME: What about the copyright for <= 2014?
+
;;; Code:
(TeX-add-style-hook "psfig"
@@ -28,8 +31,8 @@
(defun TeX-arg-psfig (optional)
"Ask for file, width and length. Insert psfig macro"
(let ((psfile (read-file-name "PS-file: " "" "" nil))
- (figwidth (read-string "Figure width: "))
- (figheight (read-string "Figure height: "))
+ (figwidth (TeX-read-string "Figure width: "))
+ (figheight (TeX-read-string "Figure height: "))
)
(insert TeX-grop "figure=" psfile)
@@ -44,13 +47,13 @@
(defun LaTeX-env-psfigure (environment)
"Create with \\label and \\caption and \\psfig commands."
- (let ((float (read-string "Float to: " LaTeX-float))
- (caption (read-string "Caption: "))
- (label (read-string "Label: " LaTeX-figure-label))
+ (let ((float (TeX-read-string "Float to: " LaTeX-float))
+ (caption (TeX-read-string "Caption: "))
+ (label (TeX-read-string "Label: " LaTeX-figure-label))
; gf: ask if this should be centered
(psfile (read-file-name "PS-file: " "" "" nil))
- (figwidth (read-string "Figure width: "))
- (figheight (read-string "Figure height: "))
+ (figwidth (TeX-read-string "Figure width: "))
+ (figheight (TeX-read-string "Figure height: "))
)
(setq LaTeX-float (if (zerop (length float))
diff --git a/style/pstricks.el b/style/pstricks.el
index 161370c3..d5adbdae 100644
--- a/style/pstricks.el
+++ b/style/pstricks.el
@@ -1,6 +1,6 @@
;;; pstricks.el --- AUCTeX style for the `pstricks' package.
-;; Copyright (C) 2007, 2009, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2007, 2009, 2013, 2014 Free Software Foundation, Inc.
;; Author: Holger Sparr <holger.sparr@gmx.net>
;; Maintainer: auctex-devel@gnu.org
@@ -636,7 +636,7 @@ package PNAME"
(defun LaTeX-pst-macro-newpsobject (&optional arg)
"Return \\newpsobject arguments after querying."
- (insert "{" (read-string "New PSObject Name: ") "}"
+ (insert "{" (TeX-read-string "New PSObject Name: ") "}"
;; FIXME: It would be better to use something more confined
;; than `TeX-symbol-list'.
"{" (completing-read "Parent Object: " (TeX-symbol-list))
diff --git a/style/scrbase.el b/style/scrbase.el
index 2414763f..169b6ec9 100644
--- a/style/scrbase.el
+++ b/style/scrbase.el
@@ -1,6 +1,6 @@
;;; scrbase.el --- AUCTeX style for the KOMA-Script bundle.
-;; Copyright (C) 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2005, 2007, 2014 Free Software Foundation, Inc.
;; Author: Mark Trettin <Mark.Trettin@gmx.de>
;; Created: 2002-09-26
@@ -75,8 +75,8 @@
'("labeling" (lambda (env &rest ignore)
(LaTeX-insert-environment
env
- (let ((delim (read-string "(Optional) Delimiter: "))
- (width (read-string "Longest item: ")))
+ (let ((delim (TeX-read-string "(Optional) Delimiter: "))
+ (width (TeX-read-string "Longest item: ")))
(concat
(if (not (zerop (length delim)))
(format "[%s]" delim))
@@ -87,8 +87,8 @@
'("addmargin" (lambda (env &rest ignore)
(LaTeX-insert-environment
env
- (let ((leftin (read-string "(Optional) Left Indentation:
"))
- (indent (read-string "Indentation: ")))
+ (let ((leftin (TeX-read-string "(Optional) Left
Indentation: "))
+ (indent (TeX-read-string "Indentation: ")))
(concat
(if (not (zerop (length leftin)))
(format "[%s]" leftin))
@@ -96,8 +96,8 @@
'("addmargin*" (lambda (env &rest ignore)
(LaTeX-insert-environment
env
- (let ((innin (read-string "(Optional) Inner Indentation:
"))
- (indent (read-string "Indentation: ")))
+ (let ((innin (TeX-read-string "(Optional) Inner
Indentation: "))
+ (indent (TeX-read-string "Indentation: ")))
(concat
(if (not (zerop (length innin)))
(format "[%s]" innin))
@@ -105,11 +105,11 @@
'("captionbeside" (lambda (env &rest ignore)
(LaTeX-insert-environment
env
- (let ((lofent (read-string "(Optional) Lof Entry: "))
- (title (read-string "Caption: "))
- (place (read-string "(Optional) Placement
(l,r,o,i): "))
- (width (read-string "(Optional) Width: "))
- (offset (read-string "(Optional) Offset: ")))
+ (let ((lofent (TeX-read-string "(Optional) Lof Entry:
"))
+ (title (TeX-read-string "Caption: "))
+ (place (TeX-read-string "(Optional) Placement
(l,r,o,i): "))
+ (width (TeX-read-string "(Optional) Width: "))
+ (offset (TeX-read-string "(Optional) Offset:
")))
(concat
(if (not (zerop (length lofent)))
(format "[%s]" lofent))
diff --git a/style/scrlttr2.el b/style/scrlttr2.el
index 44d6270e..e6973165 100644
--- a/style/scrlttr2.el
+++ b/style/scrlttr2.el
@@ -1,6 +1,6 @@
;;; scrlttr2.el --- AUCTeX style for scrlttr2.cls.
-;; Copyright (C) 2002, 2007 Free Software Foundation
+;; Copyright (C) 2002, 2007, 2014 Free Software Foundation
;; Author: Mark Trettin <Mark.Trettin@gmx.de>
;; Created: 2002-10-26
@@ -130,8 +130,8 @@
'("letter" (lambda (env &rest ignore)
(LaTeX-insert-environment
env
- (let ((options (read-string "Optional options: "))
- (recip (read-string "Recipient: ")))
+ (let ((options (TeX-read-string "Optional options: "))
+ (recip (TeX-read-string "Recipient: ")))
(concat
(if (not (zerop (length options)))
(format "[%s]" options))
diff --git a/style/textcomp.el b/style/textcomp.el
new file mode 100644
index 00000000..7f9a441e
--- /dev/null
+++ b/style/textcomp.el
@@ -0,0 +1,178 @@
+;;; textcomp.el --- AUCTeX style for `textcomp.sty' (v1.99g)
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-10-25
+;; Keywords: tex
+
+;; 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, 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 file adds support for `textcomp.sty' (v1.99g) from 2005/09/27.
+;; `textcomp.sty' is a standard LaTeX package and part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "textcomp"
+ (lambda ()
+ (TeX-add-symbols
+ '("capitalgrave" 0) ; Type: Accent -- Slot: 0
+ '("capitalacute" 0) ; Type: Accent -- Slot: 1
+ '("capitalcircumflex" 0) ; Type: Accent -- Slot: 2
+ '("capitaltilde" 0) ; Type: Accent -- Slot: 3
+ '("capitaldieresis" 0) ; Type: Accent -- Slot: 4
+ '("capitalhungarumlaut" 0) ; Type: Accent -- Slot: 5
+ '("capitalring" 0) ; Type: Accent -- Slot: 6
+ '("capitalcaron" 0) ; Type: Accent -- Slot: 7
+ '("capitalbreve" 0) ; Type: Accent -- Slot: 8
+ '("capitalmacron" 0) ; Type: Accent -- Slot: 9
+ '("capitaldotaccent" 0) ; Type: Accent -- Slot: 10
+ '("t" 0) ; Type: Accent -- Slot: 26
+ '("capitaltie" 0) ; Type: Accent -- Slot: 27
+ '("newtie" 0) ; Type: Accent -- Slot: 28
+ '("capitalnewtie" 0) ; Type: Accent -- Slot: 29
+ '("textcapitalcompwordmark" 0) ; Type: Symbol -- Slot: 23
+ '("textascendercompwordmark" 0) ; Type: Symbol -- Slot: 31
+ '("textquotestraightbase" 0) ; Type: Symbol -- Slot: 13
+ '("textquotestraightdblbase" 0) ; Type: Symbol -- Slot: 18
+ '("texttwelveudash" 0) ; Type: Symbol -- Slot: 21
+ '("textthreequartersemdash" 0) ; Type: Symbol -- Slot: 22
+ '("textleftarrow" 0) ; Type: Symbol -- Slot: 24
+ '("textrightarrow" 0) ; Type: Symbol -- Slot: 25
+ '("textblank" 0) ; Type: Symbol -- Slot: 32
+ '("textdollar" 0) ; Type: Symbol -- Slot: 36
+ '("textquotesingle" 0) ; Type: Symbol -- Slot: 39
+ '("textasteriskcentered" 0) ; Type: Symbol -- Slot: 42
+ '("textdblhyphen" 0) ; Type: Symbol -- Slot: 45
+ '("textfractionsolidus" 0) ; Type: Symbol -- Slot: 47
+ '("textzerooldstyle" 0) ; Type: Symbol -- Slot: 48
+ '("textoneoldstyle" 0) ; Type: Symbol -- Slot: 49
+ '("texttwooldstyle" 0) ; Type: Symbol -- Slot: 50
+ '("textthreeoldstyle" 0) ; Type: Symbol -- Slot: 51
+ '("textfouroldstyle" 0) ; Type: Symbol -- Slot: 52
+ '("textfiveoldstyle" 0) ; Type: Symbol -- Slot: 53
+ '("textsixoldstyle" 0) ; Type: Symbol -- Slot: 54
+ '("textsevenoldstyle" 0) ; Type: Symbol -- Slot: 55
+ '("texteightoldstyle" 0) ; Type: Symbol -- Slot: 56
+ '("textnineoldstyle" 0) ; Type: Symbol -- Slot: 57
+ '("textlangle" 0) ; Type: Symbol -- Slot: 60
+ '("textminus" 0) ; Type: Symbol -- Slot: 61
+ '("textrangle" 0) ; Type: Symbol -- Slot: 62
+ '("textmho" 0) ; Type: Symbol -- Slot: 77
+ '("textbigcircle" 0) ; Type: Symbol -- Slot: 79
+ '("textohm" 0) ; Type: Symbol -- Slot: 87
+ '("textlbrackdbl" 0) ; Type: Symbol -- Slot: 91
+ '("textrbrackdbl" 0) ; Type: Symbol -- Slot: 93
+ '("textuparrow" 0) ; Type: Symbol -- Slot: 94
+ '("textdownarrow" 0) ; Type: Symbol -- Slot: 95
+ '("textasciigrave" 0) ; Type: Symbol -- Slot: 96
+ '("textborn" 0) ; Type: Symbol -- Slot: 98
+ '("textdivorced" 0) ; Type: Symbol -- Slot: 99
+ '("textdied" 0) ; Type: Symbol -- Slot: 100
+ '("textleaf" 0) ; Type: Symbol -- Slot: 108
+ '("textmarried" 0) ; Type: Symbol -- Slot: 109
+ '("textmusicalnote" 0) ; Type: Symbol -- Slot: 110
+ '("texttildelow" 0) ; Type: Symbol -- Slot: 126
+ '("textdblhyphenchar" 0) ; Type: Symbol -- Slot: 127
+ '("textasciibreve" 0) ; Type: Symbol -- Slot: 128
+ '("textasciicaron" 0) ; Type: Symbol -- Slot: 129
+ '("textacutedbl" 0) ; Type: Symbol -- Slot: 130
+ '("textgravedbl" 0) ; Type: Symbol -- Slot: 131
+ '("textdagger" 0) ; Type: Symbol -- Slot: 132
+ '("textdaggerdbl" 0) ; Type: Symbol -- Slot: 133
+ '("textbardbl" 0) ; Type: Symbol -- Slot: 134
+ '("textperthousand" 0) ; Type: Symbol -- Slot: 135
+ '("textbullet" 0) ; Type: Symbol -- Slot: 136
+ '("textcelsius" 0) ; Type: Symbol -- Slot: 137
+ '("textdollaroldstyle" 0) ; Type: Symbol -- Slot: 138
+ '("textcentoldstyle" 0) ; Type: Symbol -- Slot: 139
+ '("textflorin" 0) ; Type: Symbol -- Slot: 140
+ '("textcolonmonetary" 0) ; Type: Symbol -- Slot: 141
+ '("textwon" 0) ; Type: Symbol -- Slot: 142
+ '("textnaira" 0) ; Type: Symbol -- Slot: 143
+ '("textguarani" 0) ; Type: Symbol -- Slot: 144
+ '("textpeso" 0) ; Type: Symbol -- Slot: 145
+ '("textlira" 0) ; Type: Symbol -- Slot: 146
+ '("textrecipe" 0) ; Type: Symbol -- Slot: 147
+ '("textinterrobang" 0) ; Type: Symbol -- Slot: 148
+ '("textinterrobangdown" 0) ; Type: Symbol -- Slot: 149
+ '("textdong" 0) ; Type: Symbol -- Slot: 150
+ '("texttrademark" 0) ; Type: Symbol -- Slot: 151
+ '("textpertenthousand" 0) ; Type: Symbol -- Slot: 152
+ '("textpilcrow" 0) ; Type: Symbol -- Slot: 153
+ '("textbaht" 0) ; Type: Symbol -- Slot: 154
+ '("textnumero" 0) ; Type: Symbol -- Slot: 155
+ '("textdiscount" 0) ; Type: Symbol -- Slot: 156
+ '("textestimated" 0) ; Type: Symbol -- Slot: 157
+ '("textopenbullet" 0) ; Type: Symbol -- Slot: 158
+ '("textservicemark" 0) ; Type: Symbol -- Slot: 159
+ '("textlquill" 0) ; Type: Symbol -- Slot: 160
+ '("textrquill" 0) ; Type: Symbol -- Slot: 161
+ '("textcent" 0) ; Type: Symbol -- Slot: 162
+ '("textsterling" 0) ; Type: Symbol -- Slot: 163
+ '("textcurrency" 0) ; Type: Symbol -- Slot: 164
+ '("textyen" 0) ; Type: Symbol -- Slot: 165
+ '("textbrokenbar" 0) ; Type: Symbol -- Slot: 166
+ '("textsection" 0) ; Type: Symbol -- Slot: 167
+ '("textasciidieresis" 0) ; Type: Symbol -- Slot: 168
+ '("textcopyright" 0) ; Type: Symbol -- Slot: 169
+ '("textordfeminine" 0) ; Type: Symbol -- Slot: 170
+ '("textcopyleft" 0) ; Type: Symbol -- Slot: 171
+ '("textlnot" 0) ; Type: Symbol -- Slot: 172
+ '("textcircledP" 0) ; Type: Symbol -- Slot: 173
+ '("textregistered" 0) ; Type: Symbol -- Slot: 174
+ '("textasciimacron" 0) ; Type: Symbol -- Slot: 175
+ '("textdegree" 0) ; Type: Symbol -- Slot: 176
+ '("textpm" 0) ; Type: Symbol -- Slot: 177
+ '("texttwosuperior" 0) ; Type: Symbol -- Slot: 178
+ '("textthreesuperior" 0) ; Type: Symbol -- Slot: 179
+ '("textasciiacute" 0) ; Type: Symbol -- Slot: 180
+ '("textmu" 0) ; Type: Symbol -- Slot: 181
+ '("textparagraph" 0) ; Type: Symbol -- Slot: 182
+ '("textperiodcentered" 0) ; Type: Symbol -- Slot: 183
+ '("textreferencemark" 0) ; Type: Symbol -- Slot: 184
+ '("textonesuperior" 0) ; Type: Symbol -- Slot: 185
+ '("textordmasculine" 0) ; Type: Symbol -- Slot: 186
+ '("textsurd" 0) ; Type: Symbol -- Slot: 187
+ '("textonequarter" 0) ; Type: Symbol -- Slot: 188
+ '("textonehalf" 0) ; Type: Symbol -- Slot: 189
+ '("textthreequarters" 0) ; Type: Symbol -- Slot: 190
+ '("texteuro" 0) ; Type: Symbol -- Slot: 191
+ '("texttimes" 0) ; Type: Symbol -- Slot: 214
+ '("textdiv" 0) ; Type: Symbol -- Slot: 246
+ '("textcircled" 1) ; Type: Command -- Slot: N/A
+ '("capitalcedilla" 1) ; Type: Command -- Slot: N/A
+ '("capitalogonek" 1) ; Type: Command -- Slot: N/A
+ '("oldstylenums" "Numbers" )) ; Type: Command -- Slot: N/A
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("oldstylenums" "{"))
+ 'type-command)))
+ LaTeX-dialect)
+
+(defvar LaTeX-textcomp-package-options
+ '("full" "almostfull" "euro" "safe" "force" "warn")
+ "Package options for the textcomp package.")
+
+;;; textcomp.el ends here
diff --git a/style/zlmtt.el b/style/zlmtt.el
new file mode 100644
index 00000000..02e62040
--- /dev/null
+++ b/style/zlmtt.el
@@ -0,0 +1,58 @@
+;;; zlmtt.el --- AUCTeX style for `zlmtt.sty' (v1.01)
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2014-10-31
+;; Keywords: tex
+
+;; 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, 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 file adds support for `zlmtt.sty' (v1.01) from 2014/06/28.
+;; `zlmtt.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "zlmtt"
+ (lambda ()
+
+ ;; New symbols
+ (TeX-add-symbols
+ '("proptt" t) ; proportional typewriter
+ '("monott" t) ; monospace typewriter
+ '("lctt" t)) ; light condensed typewriter
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("proptt" "{")
+ ("monott" "{")
+ ("lctt" "{"))
+ 'type-command)))
+ LaTeX-dialect)
+
+(defvar LaTeX-zlmtt-package-options
+ '("light" "l" "lightcondensed" "lc" "med" "m"
+ "proportional" "p" "scaled")
+ "Package options for the zlmtt package.")
+
+;;; zlmtt.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index a3538bad..26230234 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -365,9 +365,9 @@ asked if it is positive, and suppressed if it is not."
;; the command, but keep them if the command to be run is View.
(unless (string= name "View")
(if (frame-live-p TeX-error-overview-frame)
- (delete-frame TeX-error-overview-frame))
- (if (get-buffer TeX-error-overview-buffer-name)
- (kill-buffer TeX-error-overview-buffer-name)))
+ (delete-frame TeX-error-overview-frame))
+ (if (get-buffer TeX-error-overview-buffer-name)
+ (kill-buffer TeX-error-overview-buffer-name)))
;; Now start the process
(setq file (funcall file))
@@ -1383,6 +1383,14 @@ The hooks are run in the region buffer, you may use the
variable
pos (+ pos 8))))
file)
+(defvar font-lock-mode-enable-list)
+(defvar font-lock-auto-fontify)
+(defvar font-lock-defaults-alist)
+
+(defvar TeX-region-orig-buffer nil
+ "The original buffer in which the TeX-region was created.")
+(make-variable-buffer-local 'TeX-region-orig-buffer)
+
(defun TeX-region-create (file region original offset)
"Create a new file named FILE with the string REGION.
The region is taken from ORIGINAL starting at line OFFSET.
@@ -1410,7 +1418,14 @@ original file."
(font-lock-auto-fontify nil)
(font-lock-mode-enable-list nil)
;; And insert them into the FILE buffer.
- (file-buffer (let ((TeX-transient-master t))
+ (file-buffer (let (;; Don't query for master file
+ (TeX-transient-master t)
+ ;; Don't choose a special mode (and call its hooks)
+ (auto-mode-alist nil)
+ (magic-mode-alist nil)
+ (enable-local-variables nil)
+ ;; Don't run any f-f hooks
+ (find-file-hook nil))
(find-file-noselect file)))
;; But remember original content.
original-content
@@ -1432,7 +1447,7 @@ original file."
""
(re-search-forward "[\r\n]" nil t)
(buffer-substring (point-min) (point)))))))))
-
+ (header-offset 0)
;; We search for the trailer from the master file, if it is
;; not present in the region.
(trailer-offset 0)
@@ -1458,29 +1473,40 @@ original file."
original (TeX-master-directory)))
master-name (TeX-quote-filename master-name))
(with-current-buffer file-buffer
- (setq buffer-undo-list t)
+ (setq buffer-read-only t
+ buffer-undo-list t)
(setq original-content (buffer-string))
- (erase-buffer)
- (when (boundp 'buffer-file-coding-system)
- (setq buffer-file-coding-system
- (with-current-buffer master-buffer buffer-file-coding-system)))
- (insert "\\message{ !name(" master-name ")}"
- header
- TeX-region-extra
- "\n\\message{ !name(" original ") !offset(")
- (insert (int-to-string (- offset
- (1+ (TeX-current-offset))))
- ") }\n"
- region
- "\n\\message{ !name(" master-name ") !offset(")
- (insert (int-to-string (- trailer-offset
- (1+ (TeX-current-offset))))
- ") }\n"
- trailer)
- (run-hooks 'TeX-region-hook)
- (if (string-equal (buffer-string) original-content)
- (set-buffer-modified-p nil)
- (save-buffer 0)))))
+ (let ((inhibit-read-only t))
+ (erase-buffer)
+ (when (boundp 'buffer-file-coding-system)
+ (setq buffer-file-coding-system
+ (with-current-buffer master-buffer buffer-file-coding-system)))
+ (insert "\\message{ !name(" master-name ")}"
+ header
+ TeX-region-extra
+ "\n\\message{ !name(" original ") !offset(")
+ (setq header-offset (- offset
+ (1+ (TeX-current-offset))))
+ (insert (int-to-string header-offset)
+ ") }\n"
+ region
+ "\n\\message{ !name(" master-name ") !offset(")
+ (insert (int-to-string (- trailer-offset
+ (1+ (TeX-current-offset))))
+ ") }\n"
+ trailer)
+ (setq TeX-region-orig-buffer orig-buffer)
+ ;; Position point at the line/col that corresponds to point's line in
+ ;; orig-buffer in order to make forward search work.
+ (let ((line-col (with-current-buffer orig-buffer
+ (cons (line-number-at-pos)
+ (current-column)))))
+ (goto-line (abs (- header-offset (car line-col))))
+ (forward-char (cdr line-col)))
+ (run-hooks 'TeX-region-hook)
+ (if (string-equal (buffer-string) original-content)
+ (set-buffer-modified-p nil)
+ (save-buffer 0))))))
(defun TeX-region-file (&optional extension nondirectory)
"Return TeX-region file name with EXTENSION.
@@ -1499,6 +1525,72 @@ the directory."
:group 'TeX-command
:type 'string)
+(defvar LaTeX-command-section-level nil
+ "The section level used for `LaTeX-command-section'.
+Will be initialized to `LaTeX-largest-level' buffer-locally.")
+(make-variable-buffer-local 'LaTeX-command-section-level)
+
+(defun LaTeX-command-section-level ()
+ "Return the value of `LaTeX-command-section-level'.
+Initialize it to `LaTeX-largest-level' if needed."
+ (unless LaTeX-command-section-level
+ (setq LaTeX-command-section-level LaTeX-largest-level))
+ LaTeX-command-section-level)
+
+(defun LaTeX-command-section-change-level (arg)
+ "Change `LaTeX-command-section-level' by ARG.
+`LaTeX-command-section-level' is the sectioning level used to
+determine the current section by `LaTeX-command-section'. The
+levels are defined by `LaTeX-section-list'."
+ (interactive "p")
+ (let ((old-level (car (rassoc (list (LaTeX-command-section-level))
+ LaTeX-section-list))))
+ (setq LaTeX-command-section-level (+ LaTeX-command-section-level arg))
+ (cond
+ ((> LaTeX-command-section-level 6)
+ (setq LaTeX-command-section-level 6)
+ (message "Cannot shrink LaTeX-command-section-level below
subparagraph."))
+ ((< LaTeX-command-section-level 0)
+ (setq LaTeX-command-section-level 0)
+ (message "Cannot enlarge LaTeX-command-section-level above part."))
+ (t (message "Changed level from %s to %s."
+ old-level (car (rassoc (list LaTeX-command-section-level)
+ LaTeX-section-list)))))))
+
+(defun LaTeX-command-section (&optional override-confirm)
+ "Run a command on the current section.
+
+What makes the current section is defined by
+`LaTeX-command-section-level' which can be enlarged or shrunken
+with `LaTeX-command-section-change-level'.
+
+Query the user for a command to run on the temporary file
+specified by the variable `TeX-region'. The region file will be
+recreated from current section.
+
+If a prefix argument OVERRIDE-CONFIRM is given, confirmation will
+depend on it being positive instead of the entry in
+`TeX-command-list'."
+ (interactive "P")
+ (let* ((case-fold-search t)
+ (rx (concat "\\\\" (regexp-opt
+ (mapcar
+ (lambda (level)
+ (car (rassoc (list level) LaTeX-section-list)))
+ (let (r)
+ (dotimes (i (1+ (LaTeX-command-section-level)))
+ (push i r))
+ r)))
+ "{"))
+ (TeX-command-region-begin (save-excursion
+ (re-search-backward rx nil t)
+ (point)))
+ (TeX-command-region-end (save-excursion
+ (re-search-forward rx nil t)
+ (forward-line 0)
+ (point))))
+ (TeX-command-region override-confirm)))
+
;;; Parsing
;;; - Global Parser Variables
diff --git a/tex-fold.el b/tex-fold.el
index 05bd61a7..af1191f0 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -1,6 +1,6 @@
;;; tex-fold.el --- Fold TeX macros.
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011-2012
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011-2012, 2014
;; Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
@@ -44,6 +44,8 @@
;;; Code:
+(eval-when-compile (require 'cl))
+
(when (featurep 'xemacs)
(require 'overlay))
(require 'tex)
@@ -334,8 +336,8 @@ for macros and 'math for math macros."
((eq type 'math) TeX-fold-math-spec-list-internal)
(t TeX-fold-macro-spec-list-internal)))
(dolist (i (cadr item))
- (add-to-list 'fold-list (list i (car item)))
- (add-to-list 'item-list i)))
+ (pushnew (list i (car item)) fold-list :test #'equal)
+ (pushnew i item-list :test #'equal)))
(when item-list
(setq regexp (cond ((and (eq type 'env)
(eq major-mode 'context-mode))
@@ -708,7 +710,7 @@ breaks will be replaced by spaces."
(dolist (ov (overlays-at (point)))
(when (and (eq (overlay-get ov 'category) 'TeX-fold)
(numberp (overlay-get ov 'TeX-fold-display-string-spec)))
- (add-to-list 'overlays ov)))
+ (pushnew ov overlays)))
(when overlays
;; Sort list according to descending starts.
(setq overlays (sort (copy-sequence overlays)
@@ -808,7 +810,8 @@ That means, put respective properties onto overlay OV."
(n 1))
(while (setq arg (TeX-fold-macro-nth-arg
n ov-start ov-end))
- (add-to-list 'arg-list (car arg) t)
+ (unless (member (car arg) arg-list)
+ (setq arg-list (append arg-list (list (car arg)))))
(setq n (1+ n)))
(or (condition-case nil
(apply spec arg-list)
diff --git a/tex-info.el b/tex-info.el
index a5eb4931..40b03918 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -25,6 +25,8 @@
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'tex)
(require 'texinfo)
@@ -305,12 +307,12 @@ for @node."
(goto-char (point-min))
(while (re-search-forward "^@node\\b" nil t)
(skip-chars-forward " \t")
- (add-to-list 'nodes
- (list (buffer-substring-no-properties
+ (pushnew (list (buffer-substring-no-properties
(point) (progn (skip-chars-forward "^,")
- (point)))))))
+ (point))))
+ nodes :test #'equal)))
(unless active-mark
- (setq node-name (read-string "Node name: ")))
+ (setq node-name (TeX-read-string "Node name: ")))
;; FIXME: What if key binding for `minibuffer-complete' was changed?
;; `substitute-command-keys' doesn't return the correct value.
(setq next-node (completing-read "Next node (TAB completes): " nodes))
@@ -344,12 +346,12 @@ for @node."
;; Silence the byte-compiler from warnings for variables and functions declared
;; in reftex.
-(eval-when-compile
- (defvar reftex-section-levels-all)
- (defvar reftex-level-indent)
- (defvar reftex-label-menu-flags)
- (defvar reftex-tables-dirty)
+(defvar reftex-section-levels-all)
+(defvar reftex-level-indent)
+(defvar reftex-label-menu-flags)
+(defvar reftex-tables-dirty)
+(eval-when-compile
(when (fboundp 'declare-function)
(declare-function reftex-match-string "reftex" (n))
(declare-function reftex-section-number "reftex-parse" (&optional level
star))
@@ -604,9 +606,10 @@ value of `Texinfo-mode-hook'."
(set (make-local-variable 'TeX-font-replace-function)
'TeX-font-replace-macro)
(set (make-local-variable 'TeX-style-hook-dialect) :texinfo)
- (add-hook 'find-file-hooks (lambda ()
- (unless (file-exists-p (buffer-file-name))
- (TeX-master-file nil nil t))) nil t)
+ (add-hook 'find-file-hook (lambda ()
+ (unless (file-exists-p (buffer-file-name))
+ (TeX-master-file nil nil t)))
+ nil t)
(when (and (boundp 'add-log-current-defun-function)
(fboundp 'texinfo-current-defun-name))
diff --git a/tex.el b/tex.el
index b634a749..b422ed12 100644
--- a/tex.el
+++ b/tex.el
@@ -79,6 +79,11 @@
:group 'TeX-command
:type 'string)
+(defcustom TeX-file-line-error t
+ "Whether to have TeX produce file:line:error style error messages."
+ :group 'TeX-command
+ :type 'boolean)
+
(defcustom ConTeXt-engine nil
"Engine to use for --engine in the texexec command.
If nil, none is specified."
@@ -112,7 +117,7 @@ If nil, none is specified."
;; TeX-expand-list for a description of the % escapes
(defcustom TeX-command-list
- `(("TeX" "%(PDF)%(tex) %(extraopts) %`%S%(PDFout)%(mode)%' %t"
+ `(("TeX" "%(PDF)%(tex) %(file-line-error) %(extraopts)
%`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil
(plain-tex-mode ams-tex-mode texinfo-mode) :help "Run plain TeX")
("LaTeX" "%`%l%(mode)%' %t"
@@ -301,7 +306,7 @@ The executable `latex' is LaTeX version 2e."
(defcustom LaTeX-command-style
;; They have all been combined in LaTeX 2e.
- '(("" "%(PDF)%(latex) %(extraopts) %S%(PDFout)"))
+ '(("" "%(PDF)%(latex) %(file-line-error) %(extraopts) %S%(PDFout)"))
"List of style options and LaTeX commands.
If the first element (a regular expression) matches the name of one of
@@ -456,6 +461,8 @@ string."
(if TeX-interactive-mode
""
" -interaction=nonstopmode")))
+ ("%(file-line-error)"
+ (lambda () (if TeX-file-line-error " -file-line-error" "")))
("%(o?)" (lambda () (if (eq TeX-engine 'omega) "o" "")))
("%(tex)" (lambda () (eval (nth 2 (assq TeX-engine (TeX-engine-alist))))))
("%(latex)" (lambda () (eval (nth 3 (assq TeX-engine
(TeX-engine-alist))))))
@@ -1085,6 +1092,8 @@ search are checked, too."
(cdr (caar (cdr elem)))))
spec))))))))
+(defvar url-unreserved-chars)
+
(defun TeX-evince-sync-view ()
"Focus the focused page/paragraph in Evince with the position
of point in emacs by using Evince's DBUS API. Used by default
@@ -1103,27 +1112,30 @@ the requirements are met."
uri
t)))
(if owner
- (dbus-call-method
- :session owner
- "/org/gnome/evince/Window/0"
- "org.gnome.evince.Window"
- "SyncView"
- (buffer-file-name)
- (list :struct :int32 (line-number-at-pos) :int32 (1+ (current-column)))
- :uint32 0)
+ (with-current-buffer (or (when TeX-current-process-region-p
+ (get-file-buffer (TeX-region-file t)))
+ (current-buffer))
+ (dbus-call-method
+ :session owner
+ "/org/gnome/evince/Window/0"
+ "org.gnome.evince.Window"
+ "SyncView"
+ (buffer-file-name)
+ (list :struct :int32 (line-number-at-pos) :int32 (1+
(current-column)))
+ :uint32 0))
(error "Couldn't find the Evince instance for %s" uri))))
(defvar TeX-view-program-list-builtin
(cond
((eq system-type 'windows-nt)
- '(("Yap" ("yap -1" (mode-io-correlate " -s %n%b") " %o"))
- ("dvips and start" "dvips %d -o && start \"\" %f")
- ("start" "start \"\" %o")))
+ '(("Yap" ("yap -1" (mode-io-correlate " -s %n%b") " %o") "yap")
+ ("dvips and start" "dvips %d -o && start \"\" %f" ,(list "dvips"
"start"))
+ ("start" "start \"\" %o" "start")))
((eq system-type 'darwin)
- '(("Preview.app" "open -a Preview.app %o")
- ("Skim" "open -a Skim.app %o")
- ("displayline" "displayline %n %o %b")
- ("open" "open %o")))
+ '(("Preview.app" "open -a Preview.app %o" "open")
+ ("Skim" "open -a Skim.app %o" "open")
+ ("displayline" "displayline %n %o %b" "displayline")
+ ("open" "open %o" "open")))
(t
`(("xdvi" ("%(o?)xdvi"
(mode-io-correlate " -sourceposition \"%n %b\" -editor \"%cS\"")
@@ -1135,10 +1147,10 @@ the requirements are met."
(paper-letter " -paper us")
(paper-legal " -paper legal")
(paper-executive " -paper 7.25x10.5in")
- " %d"))
- ("dvips and gv" "%(o?)dvips %d -o && gv %f")
- ("gv" "gv %o")
- ("xpdf" ("xpdf -remote %s -raise %o" (mode-io-correlate " %(outpage)")))
+ " %d") "%(o?)xdvi")
+ ("dvips and gv" "%(o?)dvips %d -o && gv %f" ,(list "%(o?)dvips" "gv"))
+ ("gv" "gv %o" "gv")
+ ("xpdf" ("xpdf -remote %s -raise %o" (mode-io-correlate " %(outpage)"))
"xpdf")
("Evince" ,(if (TeX-evince-dbus-p :forward)
'TeX-evince-sync-view
`("evince" (mode-io-correlate
@@ -1147,9 +1159,9 @@ the requirements are met."
,(if (string-match "--page-index"
(shell-command-to-string
"evince --help"))
" -i %(outpage)"
- " -p %(outpage)")) " %o")))
- ("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%a")))
- ("xdg-open" "xdg-open %o"))))
+ " -p %(outpage)")) " %o")) "evince")
+ ("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%a"))
"okular")
+ ("xdg-open" "xdg-open %o"))) "xdg-open")
"Alist of built-in viewer specifications.
This variable should not be changed by the user who can use
`TeX-view-program-list' to add new viewers or overwrite the
@@ -1157,7 +1169,7 @@ definition of built-in ones. The latter variable also
contains a
description of the data format.")
(defcustom TeX-view-program-list nil
- "Alist of viewer specifications.
+ "List of viewer specifications.
This variable can be used to specify how a viewer is to be
invoked and thereby add new viewers on top of the built-in list
of viewers defined in `TeX-view-program-list-builtin' or override
@@ -1176,6 +1188,12 @@ the command line parts. Parts with a predicate are only
considered if the predicate was evaluated with a positive result.
Note that the command line can contain placeholders as defined in
`TeX-expand-list' which are expanded before the viewer is called.
+The third element of the item is optional and is a string, or a
+list of strings, with the name of the executable, or executables,
+needed to open the output file in the viewer. Placeholders
+defined in `TeX-expand-list' can be used here. This element is
+used to check whether the viewer is actually available on the
+system.
The use of a function as the second element only works if the
View command in `TeX-command-list' makes use of the hook
@@ -1186,35 +1204,39 @@ show up in the customization interface for this
variable after
restarting Emacs."
:group 'TeX-view
:type
- `(alist
- :key-type (string :tag "Name")
- :value-type
- (choice
- (group :tag "Command" (string :tag "Command"))
- (group :tag "Command parts"
- (repeat
- :tag "Command parts"
- (choice
- (string :tag "Command part")
- (list :tag "Predicate and command part"
- ,(let (list)
- ;; Build the list of available predicates.
- (mapc (lambda (spec)
- (add-to-list 'list `(const ,(car spec))))
- (append TeX-view-predicate-list
- TeX-view-predicate-list-builtin))
- ;; Sort the list alphabetically.
- (setq list (sort list
- (lambda (a b)
- (string<
- (downcase (symbol-name (cadr a)))
- (downcase (symbol-name (cadr b)))))))
- `(choice
- (choice :tag "Predicate" ,@list)
- (repeat :tag "List of predicates"
- (choice :tag "Predicate" ,@list))))
- (string :tag "Command part")))))
- (group :tag "Function" function))))
+ `(repeat
+ (list
+ (string :tag "Name")
+ (choice
+ (group :tag "Command" (string :tag "Command"))
+ (group :tag "Command parts"
+ (repeat
+ :tag "Command parts"
+ (choice
+ (string :tag "Command part")
+ (list :tag "Predicate and command part"
+ ,(let (list)
+ ;; Build the list of available predicates.
+ (mapc (lambda (spec)
+ (add-to-list 'list `(const ,(car spec))))
+ (append TeX-view-predicate-list
+ TeX-view-predicate-list-builtin))
+ ;; Sort the list alphabetically.
+ (setq list (sort list
+ (lambda (a b)
+ (string<
+ (downcase (symbol-name (cadr a)))
+ (downcase (symbol-name (cadr
b)))))))
+ `(choice
+ (choice :tag "Predicate" ,@list)
+ (repeat :tag "List of predicates"
+ (choice :tag "Predicate" ,@list))))
+ (string :tag "Command part")))))
+ (group :tag "Function" function))
+ (choice :tag "Viewer executable(s)"
+ (string :tag "One executable")
+ (repeat :tag "List of executables" (string :tag "Name"))
+ (const :tag "No executable" nil)))))
;; XXX: Regarding a possibility to (manually) run an update command,
;; one could support this through `TeX-view' by letting it temporarily
@@ -1307,16 +1329,31 @@ predicates are true, nil otherwise."
(defun TeX-view-command-raw ()
"Choose a viewer and return its unexpanded command string."
(let ((selection TeX-view-program-selection)
- entry viewer spec command)
+ entry viewer item executable spec command)
;; Find the appropriate viewer.
(while (and (setq entry (pop selection)) (not viewer))
(when (TeX-view-match-predicate (car entry))
(setq viewer (cadr entry))))
(unless viewer
(error "No matching viewer found"))
- ;; Get the command line or function spec.
- (setq spec (cadr (assoc viewer (append TeX-view-program-list
- TeX-view-program-list-builtin))))
+ (setq item (assoc viewer (append TeX-view-program-list
+ TeX-view-program-list-builtin))
+ ;; Get the command line or function spec.
+ spec (cadr item)
+ ;; Get the name of the executable(s) associated to the viewer.
+ executable (nth 2 item))
+ ;; Check the executable exists.
+ (unless (or (null executable)
+ (cond
+ ((stringp executable)
+ (executable-find (TeX-command-expand executable nil)))
+ ((listp executable)
+ (catch 'notfound
+ (dolist (exec executable t)
+ (unless (executable-find (TeX-command-expand exec nil))
+ (throw 'notfound nil)))))))
+ (error (format "Cannot find %S viewer. \
+Select another one in `TeX-view-program-selection'" viewer)))
(cond ((functionp spec)
;; Converting the function call to a string is ugly, but
;; the backend currently only supports strings.
@@ -1326,7 +1363,7 @@ predicates are true, nil otherwise."
((null spec)
(error
(format "Unknown %S viewer. \
-Check the `TeX-view-program-selection' variable." viewer)))
+Check the `TeX-view-program-selection' variable" viewer)))
(t
;; Build the unexpanded command line. Pieces with predicates are
;; only added if the predicate is evaluated positively.
@@ -1570,25 +1607,52 @@ or newer."
;; FILE may be given as relative path to the TeX-master root document or as
;; absolute file:// URL. In the former case, the tex file has to be already
;; opened.
- (let ((buf (let ((f (condition-case nil
- (progn
- (require 'url-parse)
- (require 'url-util)
- (url-unhex-string (aref (url-generic-parse-url
file) 6)))
- ;; For Emacs 21 compatibility, which doesn't have the
- ;; url package.
- (file-error (replace-regexp-in-string "^file://" ""
file)))))
- (if (file-name-absolute-p f)
- (find-file f)
- (get-buffer (file-name-nondirectory file)))))
- (line (car linecol))
- (col (cadr linecol)))
+ (let* ((line (car linecol))
+ (col (cadr linecol))
+ (region (string= TeX-region (file-name-sans-extension
+ (file-name-nondirectory file))))
+ (region-search-string nil)
+ (buf (let ((f (condition-case nil
+ (progn
+ (require 'url-parse)
+ (require 'url-util)
+ (url-unhex-string (aref (url-generic-parse-url
file) 6)))
+ ;; For Emacs 21 compatibility, which doesn't have the
+ ;; url package.
+ (file-error (replace-regexp-in-string "^file://" ""
file)))))
+ (cond
+ ;; Copy the text referenced by syntex relative in the region
+ ;; file so that we can search it in the original file.
+ (region (let ((region-buf (get-buffer (file-name-nondirectory
file))))
+ (when region-buf
+ (with-current-buffer region-buf
+ (goto-char (point-min))
+ (forward-line (1- line))
+ (let* ((p (point))
+ (bound (save-excursion
+ (re-search-backward
"\\\\message{[^}]+}" nil t)
+ (end-of-line)
+ (point)))
+ (start (save-excursion
+ (while (< (- p (point)) 250)
+ (backward-paragraph))
+ (point))))
+ (setq region-search-string
(buffer-substring-no-properties
+ (if (< start
bound) bound start)
+ (point))))
+ ;; TeX-region-create stores the original buffer
+ ;; locally as TeX-region-orig-buffer.
+ (get-buffer TeX-region-orig-buffer)))))
+ ((file-name-absolute-p f) (find-file f))
+ (t (get-buffer (file-name-nondirectory file)))))))
(if (null buf)
(message "No buffer for %s." file)
(switch-to-buffer buf)
(push-mark (point) 'nomsg)
(goto-char (point-min))
- (forward-line (1- line))
+ (if region
+ (search-forward region-search-string nil t)
+ (forward-line (1- line)))
(unless (= col -1)
(move-to-column col))
(raise-frame))))
@@ -2267,6 +2331,9 @@ This is done calling `kpsewhich --expand-path' for each
variable.
PROGRAM is passed as the parameter for --progname. SUBDIRS are
subdirectories which are appended to the directories of the TeX
trees. Only existing directories are returned."
+ ;; FIXME: The GNU convention only uses "path" to mean "list of directories"
+ ;; and uses "filename" for the name of a file even if it contains possibly
+ ;; several elements separated by "/".
(let (path-list path exit-status input-dir-list)
(condition-case nil
(dolist (var vars)
@@ -2277,9 +2344,9 @@ trees. Only existing directories are returned."
"--progname" program
"--expand-path" var))))
(when (zerop exit-status)
- (add-to-list 'path-list path t)))
+ (pushnew path path-list :test #'equal)))
(error nil))
- (dolist (elt path-list)
+ (dolist (elt (nreverse path-list))
(let ((separators (if (string-match "^[A-Za-z]:" elt)
"[\n\r;]"
"[\n\r:]")))
@@ -2291,11 +2358,11 @@ trees. Only existing directories are returned."
(dolist (subdir subdirs)
(setq path (file-name-as-directory (concat item subdir)))
(when (file-exists-p path)
- (add-to-list 'input-dir-list path t)))
+ (pushnew path input-dir-list :test #'equal)))
(setq path (file-name-as-directory item))
(when (file-exists-p path)
- (add-to-list 'input-dir-list path t))))))
- input-dir-list))
+ (pushnew path input-dir-list :test #'equal))))))
+ (nreverse input-dir-list)))
(defun TeX-macro-global ()
"Return directories containing the site's TeX macro and style files."
@@ -2351,10 +2418,10 @@ These correspond to the personal TeX macros."
(let ((path))
;; Put directories in an order where the more local files can
;; override the more global ones.
- (mapcar (lambda (file) (when file (add-to-list 'path file t)))
- (append (list TeX-auto-global TeX-style-global)
- TeX-auto-private TeX-style-private
- (list TeX-auto-local TeX-style-local)))
+ (mapc (lambda (file) (when file (add-to-list 'path file t)))
+ (append (list TeX-auto-global TeX-style-global)
+ TeX-auto-private TeX-style-private
+ (list TeX-auto-local TeX-style-local)))
path)
"List of directories to search for AUCTeX style files.
Per default the list is built from the values of the variables
@@ -2607,7 +2674,7 @@ See variable `TeX-style-hook-dialect' for supported
dialects."
(TeX-master-directory))
style (substring style
(match-beginning 2) (match-end 2))))
- (condition-case err
+ (condition-case nil
(mapcar (lambda (hook)
(cond
((functionp hook)
@@ -3008,7 +3075,7 @@ INITIAL-INPUT is a string to insert before reading input."
(let ((TeX-argument (buffer-substring (point) (mark))))
(delete-region (point) (mark))
TeX-argument)
- (read-string (TeX-argument-prompt optional prompt "Text") initial-input))
+ (TeX-read-string (TeX-argument-prompt optional prompt "Text")
initial-input))
optional))
(defun TeX-parse-arguments (args)
@@ -3273,11 +3340,11 @@ The algorithm is as follows:
(make-local-variable 'paragraph-separate)
(set (make-local-variable 'comment-start) "%")
(set (make-local-variable 'comment-start-skip)
- (concat
- "\\(\\(^\\|[^\\\n]\\)\\("
- (regexp-quote TeX-esc)
- (regexp-quote TeX-esc)
- "\\)*\\)\\(%+[ \t]*\\)"))
+ (concat
+ "\\(\\(^\\|[^\\\n]\\)\\("
+ (regexp-quote TeX-esc)
+ (regexp-quote TeX-esc)
+ "\\)*\\)\\(%+[ \t]*\\)"))
(set (make-local-variable 'comment-end-skip) "[ \t]*\\(\\s>\\|\n\\)")
(set (make-local-variable 'comment-use-syntax) t)
;; `comment-padding' is defined here as an integer for compatibility
@@ -3302,10 +3369,10 @@ The algorithm is as follows:
;; Symbol completion.
(set (make-local-variable 'TeX-complete-list)
- (list (list "\\\\\\([a-zA-Z]*\\)"
- 1 'TeX-symbol-list-filtered
- (if TeX-insert-braces "{}"))
- (list "" TeX-complete-word)))
+ (list (list "\\\\\\([a-zA-Z]*\\)"
+ 1 'TeX-symbol-list-filtered
+ (if TeX-insert-braces "{}"))
+ (list "" TeX-complete-word)))
(funcall TeX-install-font-lock)
@@ -3329,16 +3396,19 @@ The algorithm is as follows:
;;
;; `TeX-update-style' has to be called before
;; `global-font-lock-mode', which may also be specified in
- ;; `find-file-hooks', gets called. Otherwise style-based
+ ;; `find-file-hook', gets called. Otherwise style-based
;; fontification will break (in XEmacs). That means, `add-hook'
;; cannot be called with a non-nil value of the APPEND argument.
;;
;; `(TeX-master-file nil nil t)' has to be called *before*
;; `TeX-update-style' as the latter will call `TeX-master-file'
;; without the `ask' bit set.
- (when (and (featurep 'xemacs) (not (emacs-version>= 21 5)))
- (make-local-hook 'find-file-hooks))
- (add-hook 'find-file-hooks
+ (when (featurep 'xemacs)
+ (unless (boundp 'find-file-hook)
+ (defvaralias 'find-file-hook 'find-file-hooks))
+ (when (not (emacs-version>= 21 5))
+ (make-local-hook 'find-file-hook)))
+ (add-hook 'find-file-hook
(lambda ()
;; Check if we are looking at a new or shared file.
(when (or (not (file-exists-p (buffer-file-name)))
@@ -3550,6 +3620,10 @@ directory hierarchy, t means recurse indefinitely."
(const :tag "Off" nil)
(integer :tag "Depth" :value 1)))
+(defvar TeX-file-extensions)
+(defvar BibTeX-file-extensions)
+(defvar TeX-Biber-file-extensions)
+
;;;###autoload
(defun TeX-auto-generate (tex auto)
"Generate style file for TEX and store it in AUTO.
@@ -4001,10 +4075,11 @@ EXTENSIONS defaults to `TeX-file-extensions'."
"Return a list of available TeX tree roots."
(let (list)
(dolist (dir (TeX-tree-expand '("$TEXMFHOME" "$TEXMFMAIN" "$TEXMFLOCAL"
- "$TEXMFDIST") "latex"))
+ "$TEXMFDIST")
+ "latex"))
(when (file-readable-p dir)
- (add-to-list 'list dir t)))
- list))
+ (pushnew dir list :test #'equal)))
+ (nreverse list)))
(defcustom TeX-tree-roots (TeX-tree-roots)
"List of all available TeX tree root directories."
@@ -4166,19 +4241,23 @@ If optional argument STRIP is non-nil, remove file
extension."
(if (null TeX-tree-roots)
(error "No TeX trees available; configure `TeX-tree-roots'")
;; Expand variables.
- (dolist (rawdir rawdirs)
- (if (symbolp rawdir)
- (setq expdirs (append expdirs (eval rawdir)))
- (add-to-list 'expdirs rawdir t)))
- (delete-dups expdirs)
+ (setq expdirs
+ (delete-dups
+ (apply #'append
+ (mapcar (lambda (rawdir)
+ (if (symbolp rawdir)
+ (symbol-value rawdir)
+ (list rawdir)))
+ rawdirs))))
;; Assumption: Either all paths are absolute or all are relative.
(if (file-name-absolute-p (car expdirs))
(setq dirs expdirs)
;; Append relative TDS subdirs to all TeX tree roots.
(dolist (root TeX-tree-roots)
(dolist (dir expdirs)
- (add-to-list 'dirs (concat (file-name-as-directory root)
- dir) t)))))
+ (let ((dir (expand-file-name dir root)))
+ (unless (member dir dirs)
+ (setq dirs (append dirs (list dir)))))))))
(append local-files (TeX-search-files dirs exts nodir strip)))))))
;;; Narrowing
@@ -5605,7 +5684,7 @@ With optional argument ARG, also reload the style hooks."
(save-buffer)
(TeX-auto-write)))
(normal-mode)
- ;; See also addition to `find-file-hooks' in `VirTeX-common-initialization'.
+ ;; See also addition to `find-file-hook' in `VirTeX-common-initialization'.
(when (eq TeX-master 'shared) (TeX-master-file nil nil t))
(TeX-update-style t))
@@ -5818,7 +5897,9 @@ If the bug is triggered by a specific \(La\)TeX file, you
should try
to produce a minimal sample file showing the problem and include it
in your report.
-Your bug report will be posted to the AUCTeX bug reporting list.
+Your report will be posted for the auctex package at the GNU bug
+tracker. Visit http://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=auctex
+to browse existing AUCTeX bugs.
------------------------------------------------------------------------")))
@@ -5893,7 +5974,7 @@ NAME may be a package, a command, or a document."
(when (memq major-mode (nth 1 elt))
(let ((completions (funcall (nth 2 elt))))
(unless (null completions)
- (add-to-list 'docs (cons completions (nth 0 elt)))))))
+ (pushnew (cons completions (nth 0 elt)) docs :test #'equal)))))
(if (null docs)
(progn
(if (executable-find "texdoc")
diff --git a/toolbar-x.el b/toolbar-x.el
index ef4edc89..8f506561 100644
--- a/toolbar-x.el
+++ b/toolbar-x.el
@@ -1,6 +1,6 @@
;;; toolbar-x.el --- fancy toolbar handling in Emacs and XEmacs
-;; Copyright (C) 2004, 2005, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2008, 2014 Free Software Foundation, Inc.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
@@ -106,6 +106,8 @@
;;; Code:
+(eval-when-compile (require 'cl))
+
;; Note that this just gives a useful default. Icons are expected to
;; be in subdirectory "images" or "toolbar" relative to the load-path.
;; Packages loading toolbarx are advised to explicitly add their own
@@ -177,8 +179,7 @@ different. OPTION-LIST equal to nil is a good option list."
(dotimes (i n)
(when (> i 0)
(setq temp-opt-list (cddr temp-opt-list)))
- (add-to-list 'list-diff
- (car temp-opt-list))
+ (pushnew (car temp-opt-list) list-diff :test #'equal)
(setq elt-in-valid (and elt-in-valid
(memq (car temp-opt-list)
valid-options))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- main c3906824 028/257: Merge from upstream.,
Tassilo Horn <=