[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 111/299: Add history variables in some style files.
From: |
Stefan Monnier |
Subject: |
[elpa] 111/299: Add history variables in some style files. |
Date: |
Sun, 02 Nov 2014 03:10:42 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 01b89059f7dacb87bae78e1545560b2f4636314f
Author: Mosè Giordano <address@hidden>
Date: Wed Apr 24 23:34:53 2013 +0200
Add history variables in some style files.
* style/acro.el (LaTeX-acro-acronym-history): New variable.
(LaTeX-arg-acro-acronym): Use it.
* style/acronym.el (LaTeX-acronym-acronym-history): New variable.
(LaTeX-arg-acronym-acronym): Use it.
* style/beamer.el (LaTeX-beamer-frametitle-history): New variable.
("beamer"): Use it.
(TeX-arg-beamer-frametitle): Ditto.
* style/siunitx.el (LaTeX-siunitx-unit-history): New variable.
(LaTeX-arg-siunitx-unit): Use it.
---
ChangeLog | 15 +++++++++++++++
style/acro.el | 6 +++++-
style/acronym.el | 6 +++++-
style/beamer.el | 11 ++++++++---
style/siunitx.el | 6 +++++-
5 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2692734..0aa4d00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2013-04-24 Mos� Giordano <address@hidden>
+
+ * style/acro.el (LaTeX-acro-acronym-history): New variable.
+ (LaTeX-arg-acro-acronym): Use it.
+
+ * style/acronym.el (LaTeX-acronym-acronym-history): New variable.
+ (LaTeX-arg-acronym-acronym): Use it.
+
+ * style/beamer.el (LaTeX-beamer-frametitle-history): New variable.
+ ("beamer"): Use it.
+ (TeX-arg-beamer-frametitle): Ditto.
+
+ * style/siunitx.el (LaTeX-siunitx-unit-history): New variable.
+ (LaTeX-arg-siunitx-unit): Use it.
+
2013-04-21 Mos� Giordano <address@hidden>
* style/beamer.el ("beamer"): Set `frame' as default environment.
diff --git a/style/acro.el b/style/acro.el
index d41a9a1..93eb32f 100644
--- a/style/acro.el
+++ b/style/acro.el
@@ -104,6 +104,9 @@ set to `true'."
(add-hook 'TeX-auto-prepare-hook 'LaTeX-acro-prepare)
(add-hook 'TeX-auto-cleanup-hook 'LaTeX-acro-cleanup)
+(defvar LaTeX-acro-acronym-history nil
+ "History of acronyms in acro.")
+
(defun LaTeX-arg-acro-acronym (optional &optional prompt definition)
"Prompt for an acronym completing with known acronyms.
If OPTIONAL is non-nil, insert the resulting value as an optional
@@ -111,7 +114,8 @@ argument, otherwise as a mandatory one. Use PROMPT as the
prompt
string. If DEFINITION is non-nil, add the chosen acronym to the
list of defined acronyms."
(let ((acronym (completing-read (TeX-argument-prompt optional prompt
"Acronym")
- (LaTeX-acro-acronym-list))))
+ (LaTeX-acro-acronym-list) nil nil nil
+ 'LaTeX-acro-acronym-history)))
(if (and definition (not (string-equal "" acronym)))
(LaTeX-add-acro-acronyms acronym))
(TeX-argument-insert acronym optional optional)))
diff --git a/style/acronym.el b/style/acronym.el
index 3bffd70..11295d1 100644
--- a/style/acronym.el
+++ b/style/acronym.el
@@ -53,6 +53,9 @@
(add-hook 'TeX-auto-prepare-hook 'LaTeX-acronym-prepare)
(add-hook 'TeX-auto-cleanup-hook 'LaTeX-acronym-cleanup)
+(defvar LaTeX-acronym-acronym-history nil
+ "History of acronyms in acronym.")
+
;; The former `acronym' stands for package name, the latter stands for the
;; argument of the macro calling this function.
(defun LaTeX-arg-acronym-acronym (optional &optional prompt definition)
@@ -62,7 +65,8 @@ argument, otherwise as a mandatory one. Use PROMPT as the
prompt
string. If DEFINITION is non-nil, add the chosen acronym to the
list of defined acronyms."
(let ((acronym (completing-read (TeX-argument-prompt optional prompt
"Acronym")
- (LaTeX-acronym-list))))
+ (LaTeX-acronym-list) nil nil nil
+ 'LaTeX-acronym-acronym-history)))
(if (and definition (not (string-equal "" acronym)))
(LaTeX-add-acronyms acronym))
(TeX-argument-insert acronym optional optional)))
diff --git a/style/beamer.el b/style/beamer.el
index fdd2293..d41c553 100644
--- a/style/beamer.el
+++ b/style/beamer.el
@@ -51,6 +51,9 @@
(goto-char end-of-begin)
(insert "[fragile]")))))))
+(defvar LaTeX-beamer-frametitle-history nil
+ "History of frame titles in beamer.")
+
(TeX-add-style-hook
"beamer"
(lambda ()
@@ -83,7 +86,8 @@
'("beamerreturnbutton" 1)
'("beamerskipbutton" 1)
'("frame" TeX-arg-beamer-frametitle)
- '("frametitle" 1)
+ '("frametitle"
+ (TeX-arg-eval 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)
@@ -132,7 +136,8 @@
"columnsonlytextwidth"
'("exampleblock" 1)
'("frame" (lambda (env &rest ignore)
- (let ((title (read-string "(Optional) Title: ")))
+ (let ((title (read-string "(Optional) Title: " nil
+ 'LaTeX-beamer-frametitle-history)))
(LaTeX-insert-environment env)
(unless (zerop (length title))
(save-excursion
@@ -193,7 +198,7 @@
(defun TeX-arg-beamer-frametitle (optional &optional prompt)
"Prompt for the frametitle."
- (let ((title (read-string "Title: ")))
+ (let ((title (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)
diff --git a/style/siunitx.el b/style/siunitx.el
index 230c62e..10608a8 100644
--- a/style/siunitx.el
+++ b/style/siunitx.el
@@ -57,6 +57,9 @@
(add-hook 'TeX-auto-prepare-hook 'LaTeX-siunitx-prepare)
(add-hook 'TeX-auto-cleanup-hook 'LaTeX-siunitx-cleanup)
+(defvar LaTeX-siunitx-unit-history nil
+ "History of units in siunitx.")
+
(defun LaTeX-arg-siunitx-unit (optional &optional prompt initial-input
definition)
"Prompt for siunitx units, prefixes, powers, and qualifiers.
If OPTIONAL is non-nil, insert the resulting value as an optional
@@ -77,7 +80,8 @@ non-nil, add the chosen unit to the list of defined units."
(unit (mapconcat 'identity
(TeX-completing-read-multiple
(TeX-argument-prompt optional prompt "Unit")
- (LaTeX-siunitx-unit-list) nil nil initial-input)
+ (LaTeX-siunitx-unit-list) nil nil initial-input
+ 'LaTeX-siunitx-unit-history)
crm-separator)))
(if (and definition (not (string-equal "" unit)))
(LaTeX-add-siunitx-units unit))
- [elpa] 102/299: Document some missing functions and options., (continued)
- [elpa] 102/299: Document some missing functions and options., Stefan Monnier, 2014/11/01
- [elpa] 103/299: Use user-full-name as initial input to author macro., Stefan Monnier, 2014/11/01
- [elpa] 100/299: Better unbinding of SPC in LaTeX-arg-acro-key-val and LaTeX-arg-siunitx-unit., Stefan Monnier, 2014/11/01
- [elpa] 106/299: Add beamer class options., Stefan Monnier, 2014/11/01
- [elpa] 95/299: Add new style files acro.el and acronym.el., Stefan Monnier, 2014/11/01
- [elpa] 108/299: Some improvements to amsthm style file., Stefan Monnier, 2014/11/01
- [elpa] 107/299: Add counters and pagestyle to some class styles., Stefan Monnier, 2014/11/01
- [elpa] 110/299: Set default environment for some class styles., Stefan Monnier, 2014/11/01
- [elpa] 113/299: Change BibTeX button to Biber when LaTeX-using-biber is non-nil., Stefan Monnier, 2014/11/01
- [elpa] 112/299: Add new variable `LaTeX-default-document-environment'., Stefan Monnier, 2014/11/01
- [elpa] 111/299: Add history variables in some style files.,
Stefan Monnier <=
- [elpa] 115/299: Document LaTeX-default-document-environment., Stefan Monnier, 2014/11/01
- [elpa] 114/299: Wrap dollars around active region typing `$'., Stefan Monnier, 2014/11/01
- [elpa] 119/299: Fixes to TeX-arg-index-tag, TeX-arg-cite, TeX-parse-arguments., Stefan Monnier, 2014/11/01
- [elpa] 117/299: Insert one $ when point is in a verbatim construct., Stefan Monnier, 2014/11/01
- [elpa] 109/299: Fix in TeX-arg-insert-braces., Stefan Monnier, 2014/11/01
- [elpa] 121/299: Silence some compilation warning., Stefan Monnier, 2014/11/01
- [elpa] 124/299: Make forward PDF search with Okular work., Stefan Monnier, 2014/11/01
- [elpa] 123/299: Fix docstring of `TeX-source-correlate-sync-source'., Stefan Monnier, 2014/11/01
- [elpa] 116/299: Temporary fix for font-latex-jit-lock-force-redisplay., Stefan Monnier, 2014/11/01
- [elpa] 126/299: Fix for autogen.sh., Stefan Monnier, 2014/11/01