[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 68/299: * latex.el (TeX-arg-date): New function. (LaTeX-common-in
From: |
Stefan Monnier |
Subject: |
[elpa] 68/299: * latex.el (TeX-arg-date): New function. (LaTeX-common-initialization): Use `TeX-arg-date' for \date macro. |
Date: |
Sun, 02 Nov 2014 03:10:22 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit e9e8057f086b56a9642dba792648e09835bbb00a
Author: Tassilo Horn <address@hidden>
Date: Mon Mar 4 09:26:50 2013 +0000
* latex.el (TeX-arg-date): New function.
(LaTeX-common-initialization): Use `TeX-arg-date' for \date macro.
* doc/auctex.texi: Document `TeX-arg-date'.
* style/doc.el ("doc"): Use `TeX-arg-date' for the \changes macro.
---
ChangeLog | 9 +++++++++
doc/auctex.texi | 3 +++
latex.el | 14 +++++++++++++-
style/doc.el | 2 +-
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 50558c3..6ec462c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-03-04 Tassilo Horn <address@hidden>
+
+ * latex.el (TeX-arg-date): New function.
+ (LaTeX-common-initialization): Use `TeX-arg-date' for \date macro.
+
+ * doc/auctex.texi: Document `TeX-arg-date'.
+
+ * style/doc.el ("doc"): Use `TeX-arg-date' for the \changes macro.
+
2013-02-26 Tassilo Horn <address@hidden>
* tex.el (TeX-run-style-hooks): Guard running style hooks in a
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 309f3c7..61609df 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -3961,6 +3961,9 @@ Prompt for a @LaTeX{} length completing with known
lengths.
@item TeX-arg-macro
Prompt for a @TeX{} macro with completion.
address@hidden TeX-arg-date
+Prompt for a date, defaulting to the current date.
+
@item TeX-arg-environment
Prompt for a @LaTeX{} environment with completion.
diff --git a/latex.el b/latex.el
index 724936b..41de1b2 100644
--- a/latex.el
+++ b/latex.el
@@ -1980,6 +1980,18 @@ string."
nil t)
optional))
+(defun TeX-arg-date (optional &optional prompt)
+ "Prompt for a date, defaulting to the current date.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one. Use PROMPT as the prompt
+string."
+ (let ((default (format-time-string "%Y/%m/%d" (current-time))))
+ (TeX-argument-insert
+ (TeX-read-string (TeX-argument-prompt
+ optional prompt (format "Date (default %s)" default))
+ nil nil default)
+ optional)))
+
(defun TeX-arg-pagestyle (optional &optional prompt definition)
"Prompt for a LaTeX pagestyle with completion.
If OPTIONAL is non-nil, insert the resulting value as an optional
@@ -5461,7 +5473,7 @@ i.e. you do _not_ have to cater for this yourself by
adding \\\\' or $."
'("breve" t) '("check" t) '("hat" t) '("vec" t) '("dot" t)
'("widetilde" t) '("widehat" t)
'("author" t)
- '("date" t)
+ '("date" TeX-arg-date)
'("thanks" t)
'("title" t)
'("pagenumbering" (TeX-arg-eval
diff --git a/style/doc.el b/style/doc.el
index b342d87..e45f0f7 100644
--- a/style/doc.el
+++ b/style/doc.el
@@ -119,7 +119,7 @@
"efill"
"pfill"
"PrintIndex"
- '("changes" "version" "date (YYYY/MM/DD)")
+ '("changes" "version" TeX-arg-date t)
"generalname"
"RecordChanges"
"GlossaryPrologue"
- [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'., (continued)
- [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
- [elpa] 60/299: * Makefile.in (STYLESRC): Activate new style array.el., Stefan Monnier, 2014/11/01
- [elpa] 61/299: * latex.el (LaTeX-math-default): Move `digamma' and `varkappa' to `AMS > Greek Lowercase' menu., Stefan Monnier, 2014/11/01
- [elpa] 58/299: * style/biblatex.el ("biblatex"): Add hooks for loaded packages. (LaTeX-biblatex-package-options): New function. (LaTeX-biblatex-package-options-list): Renamed from `LaTeX-biblatex-package-options' to avoid clash with the function with the same name., Stefan Monnier, 2014/11/01
- [elpa] 63/299: * style/scrbase.el ("scrbase"): Add \minisec macro to `LaTeX-paragraph-commands' locally., Stefan Monnier, 2014/11/01
- [elpa] 64/299: * latex.el (LaTeX-paragraph-commands-internal): Add \clearpage and \newpage., Stefan Monnier, 2014/11/01
- [elpa] 65/299: * tex.el (TeX-parse-macro): Add TeX group characters also in math environments if there is an active region that should probably used as argument., Stefan Monnier, 2014/11/01
- [elpa] 67/299: * tex.el (TeX-run-style-hooks): Guard running style hooks in a `condition-case' in order not to error in cases the auto file contains calls to functions that are defined by a style that has been deactivated in the meantime., Stefan Monnier, 2014/11/01
- [elpa] 59/299: * tex.el (require): Require crm., Stefan Monnier, 2014/11/01
- [elpa] 68/299: * latex.el (TeX-arg-date): New function. (LaTeX-common-initialization): Use `TeX-arg-date' for \date macro.,
Stefan Monnier <=
- [elpa] 57/299: * style/siunitx.el (LaTeX-siunitx-package-options): New function., Stefan Monnier, 2014/11/01
- [elpa] 70/299: * tex.el (TeX-command-list): Add support for xindy., Stefan Monnier, 2014/11/01
- [elpa] 69/299: * latex.el (LaTeX-common-initialization): Added regular expression for thispagestyle and pagestyle to `TeX-complete-list'., Stefan Monnier, 2014/11/01
- [elpa] 66/299: * style/dinbrief.el ("dinbrief"): Update dinbrief style. (LaTeX-dinbrief-insert): New macro. (LaTeX-dinbrief-style): New function. (LaTeX-dinbrief-env-recipient): Rename from `LaTeX-recipient-hook'. (LaTeX-dinbrief-sender): New function. (LaTeX-dinbrief-recipient): New function. (LaTeX-dinbrief-today): Rename from `LaTeX-today'., Stefan Monnier, 2014/11/01
- [elpa] 62/299: * style/kpfonts.el: New style file., Stefan Monnier, 2014/11/01
- [elpa] 71/299: * style/amsopn.el: Add GPL copyright notice. ("amsopn"): Add regex for \DeclareMathOperator to `LaTeX-auto-regexp-list'. Use `TeX-arg-define-macro' for \DeclareMathOperator., Stefan Monnier, 2014/11/01
- [elpa] 73/299: * tex.el (TeX-add-local-master): Remove trailing spaces from inserted lines., Stefan Monnier, 2014/11/01
- [elpa] 72/299: * latex.el (TeX-read-key-val): New function. (TeX-arg-key-val): Use `TeX-read-key-val'., Stefan Monnier, 2014/11/01
- [elpa] 76/299: * style/biblatex.el (LaTeX-biblatex-package-options): Correct name of `TeX-read-key-val' argument., Stefan Monnier, 2014/11/01
- [elpa] 75/299: * latex.el (LaTeX-common-initialization): Remove `addbibresource' macro., Stefan Monnier, 2014/11/01