[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 45/299: * latex.el (LaTeX-auto-savebox-regexp-list): New variable
From: |
Stefan Monnier |
Subject: |
[elpa] 45/299: * latex.el (LaTeX-auto-savebox-regexp-list): New variable. (LaTeX-auto-regexp-list): Use `LaTeX-auto-savebox-regexp-list'. ("savebox"): New type for the parser. (TeX-arg-savebox): Use `LaTeX-savebox-list' for completion and `definition' argument. (LaTeX-common-initialization): Added makeatletter, makeatother, and jobname macros. (LaTeX-default-options): Changed documentstyle to documentclass in docstring. |
Date: |
Sun, 02 Nov 2014 03:10:10 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit d80ec1562b02978fabdb3b2af6e7f466c2260bf0
Author: Tassilo Horn <address@hidden>
Date: Mon Jan 28 08:35:44 2013 +0000
* latex.el (LaTeX-auto-savebox-regexp-list): New variable.
(LaTeX-auto-regexp-list): Use `LaTeX-auto-savebox-regexp-list'.
("savebox"): New type for the parser.
(TeX-arg-savebox): Use `LaTeX-savebox-list' for completion and
`definition' argument.
(LaTeX-common-initialization): Added makeatletter, makeatother,
and jobname macros.
(LaTeX-default-options): Changed documentstyle to documentclass in
docstring.
---
ChangeLog | 12 ++++++++++++
latex.el | 32 ++++++++++++++++++++------------
2 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 20eaf04..73b0151 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-01-26 Mads Jensen <address@hidden>
+
+ * latex.el (LaTeX-auto-savebox-regexp-list): New variable.
+ (LaTeX-auto-regexp-list): Use `LaTeX-auto-savebox-regexp-list'.
+ ("savebox"): New type for the parser.
+ (TeX-arg-savebox): Use `LaTeX-savebox-list' for completion and
+ `definition' argument.
+ (LaTeX-common-initialization): Added makeatletter, makeatother,
+ and jobname macros.
+ (LaTeX-default-options): Changed documentstyle to documentclass in
+ docstring.
+
2013-01-25 Mos� Giordano <address@hidden>
* style/siunitx.el ("siunitx"): Add `\gram' and
diff --git a/latex.el b/latex.el
index 4eb80f6..3464ad1 100644
--- a/latex.el
+++ b/latex.el
@@ -48,8 +48,8 @@
:type 'string)
(defcustom LaTeX-default-options nil
- "Default options to documentstyle.
-A list of strings."
+ "Default options to documentclass.
+A comma-seperated list of strings."
:group 'LaTeX-environment
:type '(repeat (string :format "%v")))
@@ -1215,6 +1215,10 @@ This is necessary since index entries may contain
commands and stuff.")
'(("\\\\newlength *{?\\\\\\([A-Za-z]+\\)}?" 1 LaTeX-auto-length))
"List of regular expressions matching LaTeX lengths only.")
+(defvar LaTeX-auto-savebox-regexp-list
+ '(("\\\\newsavebox *{?\\\\\\([A-Za-z]+\\)}?" 1 LaTeX-auto-savebox))
+ "List of regular expressions matching LaTeX saveboxes only.")
+
(defvar LaTeX-auto-regexp-list
(append
(let ((token TeX-token-char))
@@ -1251,7 +1255,8 @@ This is necessary since index entries may contain
commands and stuff.")
LaTeX-auto-minimal-regexp-list
LaTeX-auto-pagestyle-regexp-list
LaTeX-auto-counter-regexp-list
- LaTeX-auto-length-regexp-list)
+ LaTeX-auto-length-regexp-list
+ LaTeX-auto-savebox-regexp-list)
"List of regular expression matching common LaTeX macro definitions.")
(defun LaTeX-split-bibs (match)
@@ -1441,6 +1446,7 @@ The input string may include LaTeX comments and newlines."
(TeX-auto-add-type "pagestyle" "LaTeX")
(TeX-auto-add-type "counter" "LaTeX")
(TeX-auto-add-type "length" "LaTeX")
+(TeX-auto-add-type "savebox" "LaTeX" "saveboxes")
(fset 'LaTeX-add-bibliographies-auto
(symbol-function 'LaTeX-add-bibliographies))
@@ -1608,18 +1614,19 @@ the list of defined counters."
(LaTeX-add-counters counter))
(TeX-argument-insert counter optional)))
-;; Why is DEFINITION unused?
(defun TeX-arg-savebox (optional &optional prompt definition)
"Prompt for a LaTeX savebox.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one. Use PROMPT as the prompt
-string. DEFINITION is unused."
- ;; Completion not implemented yet.
- (TeX-argument-insert
- (read-string (TeX-argument-prompt optional prompt
- (concat "Savebox: " TeX-esc)
- t))
- optional TeX-esc))
+string. If definition is non-nil, the savebox is added to the
+list of defined saveboxes."
+ (let ((savebox (completing-read (TeX-argument-prompt optional prompt
+ (concat "Savebox: "
+ TeX-esc) t)
+ (LaTeX-savebox-list))))
+ (if (and definition (not (zerop (length savebox))))
+ (LaTeX-add-saveboxes savebox))
+ (TeX-argument-insert savebox optional TeX-esc)))
(defun TeX-arg-length (optional &optional prompt initial-input definition)
"Prompt for a LaTeX length.
@@ -5512,7 +5519,8 @@ i.e. you do _not_ have to cater for this yourself by
adding \\\\' or $."
"hfil" "hfill" "vfil" "vfill" "hrulefill" "dotfill"
"indent" "noindent" "today"
"appendix"
- "dots")
+ "dots"
+ "makeatletter" "makeatother" "jobname")
(when (string-equal LaTeX-version "2e")
(LaTeX-add-environments
- [elpa] 38/299: * style/placeins.el: New style., (continued)
- [elpa] 38/299: * style/placeins.el: New style., Stefan Monnier, 2014/11/01
- [elpa] 39/299: * texmathp.el (texmathp-tex-commands-default): Add \shortintertext., Stefan Monnier, 2014/11/01
- [elpa] 35/299: * latex.el (LaTeX-auto-length-regexp-list): New variable. (LaTeX-auto-regexp-list): Use `LaTeX-auto-length-regexp-list'. ("length"): New type for the parser. (TeX-arg-length): New function. (TeX-arg-define-length): New function. (LaTeX-common-initialization): Initialize some standard LaTeX lengths and use `TeX-arg-length' and `TeX-arg-define-length' for completion of some macros., Stefan Monnier, 2014/11/01
- [elpa] 40/299: * Makefile.in (STYLESRC): Activate new style placeins.el., Stefan Monnier, 2014/11/01
- [elpa] 33/299: * doc/auctex.texi: Document that `TeX-arg-counter' does completion now. * latex.el (LaTeX-auto-pagestyle-regexp-list): Fix typo. (LaTeX-auto-counter-regexp-list): New variable. (LaTeX-auto-regexp-list): Use `LaTeX-auto-counter-regexp-list'. ("counter"): New type for the parser. (TeX-arg-counter): Use `LaTeX-counter-list' function for completion and `definition' argument. (TeX-arg-pagestyle): Use `definition' argument. (LaTeX-common-initialization): Initialize counters., Stefan Monnier, 2014/11/01
- [elpa] 41/299: * tex-buf.el (TeX-output-revert-buffer): New function. (TeX-special-mode, TeX-output-mode): New major modes. (TeX-special-mode-map, TeX-output-mode-map): New variables., Stefan Monnier, 2014/11/01
- [elpa] 43/299: * tex-buf.el (TeX-output-mode): Make revert-buffer-function buffer local before setting it to TeX-output-revert-buffer., Stefan Monnier, 2014/11/01
- [elpa] 42/299: * auctex.texi: Updated documetation about ChkTeX and lacheck. Fixed typos., Stefan Monnier, 2014/11/01
- [elpa] 44/299: * style/siunitx.el ("siunitx"): Add `\gram' and `\SendSettingsToPgf'., Stefan Monnier, 2014/11/01
- [elpa] 46/299: * latex.el (LaTeX-env-contents): Replaced regular expression with `LaTeX-header-end', i.e., filecontents environments must go somewhere in the preamble but not necessarily before the \documentclass., Stefan Monnier, 2014/11/01
- [elpa] 45/299: * latex.el (LaTeX-auto-savebox-regexp-list): New variable. (LaTeX-auto-regexp-list): Use `LaTeX-auto-savebox-regexp-list'. ("savebox"): New type for the parser. (TeX-arg-savebox): Use `LaTeX-savebox-list' for completion and `definition' argument. (LaTeX-common-initialization): Added makeatletter, makeatother, and jobname macros. (LaTeX-default-options): Changed documentstyle to documentclass in docstring.,
Stefan Monnier <=
- [elpa] 47/299: * doc/todo.texi (Wishlist): Remove "Completion for sboxes"., Stefan Monnier, 2014/11/01
- [elpa] 48/299: * style/biblatex.el: Update copyright range. ("biblatex"): Check `backend' option value in `TeX-active-styles'. * tex-style.el: Update copyright years. (LaTeX-biblatex-use-Biber) Remove unused variable. * tex.el: Update copyright range. (TeX-auto-add-type): Append new type to `TeX-auto-parser' instead of prepending it. (TeX-auto-store): Fix indentation of first lines of parsed file. * latex.el (LaTeX-auto-cleanup): Append options and styles to `TeX-auto-file' instead of prepending them., Stefan Monnier, 2014/11/01
- [elpa] 51/299: * Makefile.in (STYLESRC): Activate new style fancynum.el., Stefan Monnier, 2014/11/01
- [elpa] 50/299: * Makefile.in (STYLESRC): Activate new style nameref.el., Stefan Monnier, 2014/11/01
- [elpa] 52/299: * Makefile.in (STYLESRC): Activate new style filecontents.el., Stefan Monnier, 2014/11/01
- [elpa] 55/299: * style/fancyhdr.el (TeX-arg-fancyhdr-position): Document the OPTIONAL argument., Stefan Monnier, 2014/11/01
- [elpa] 56/299: * style/subfigure.el: Expanded copyright range. ("subfigure"): Collapsed the two regular expressions for completion. Added lengths, and commands for fonts., Stefan Monnier, 2014/11/01
- [elpa] 49/299: * style/siunitx.el ("siunitx-unit"): New type for the parser. (LaTeX-siunitx-regexp): New variable. (LaTeX-auto-siunitx-unit): New variable. (LaTeX-siunitx-prepare): New function. (LaTeX-siunitx-cleanup): New function. (TeX-auto-prepare-hook): Add `LaTeX-siunitx-prepare' function. (TeX-auto-cleanup-hook): Add `LaTeX-siunitx-cleanup' function. (TeX-arg-siunitx-unit): New function. (TeX-arg-define-siunitx-unit): New function. ("siunitx"): Add `LaTeX-siunitx-regexp' to list of regexps used for parsing. ("siunitx"): Use `TeX-arg-siunitx-unit' and `TeX-arg-define-siunitx-unit' functions. ("siunitx"): Use `LaTeX-add-siunitx-units' for adding siunitx unit macros to the list of known units., Stefan Monnier, 2014/11/01
- [elpa] 53/299: * doc/auctex.texi (Quotes): Document `TeX-math-close-single-dollar'. (Selecting a Command): Remove reference to `LaTeX-biblatex-use-Biber'. (Parsing Files): Document `LaTeX-auto-index-regexp-list', `LaTeX-auto-class-regexp-list', `LaTeX-auto-pagestyle-regexp-list', `LaTeX-auto-counter-regexp-list', `LaTeX-auto-length-regexp-list', `LaTeX-auto-savebox-regexp-list'., Stefan Monnier, 2014/11/01
- [elpa] 54/299: * Makefile.in (STYLESRC): Activate new style fancyhdr.el., Stefan Monnier, 2014/11/01