monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 1a48f0c736ef4d196da1229d313012bc7ed41866
Author: Tassilo Horn <[email protected]>
Date: Wed Jan 29 20:58:45 2014 +0100
Use default parameter of `completing-read'.
* tex-buf.el (TeX-command-query): Use default parameter of
`completing-read'.
* tex.el (TeX-insert-macro): Use default parameter of
`completing-read'.
* latex.el (LaTeX-environment, TeX-arg-document): Use default
parameter of `completing-read'.
---
ChangeLog | 8 +++++++-
latex.el | 4 +---
tex-buf.el | 2 +-
tex.el | 8 +++-----
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7de663b..f3145ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,14 @@
2014-01-29 Tassilo Horn <[email protected]>
- * latex.el (LaTeX-environment): Use default parameter of
+ * tex-buf.el (TeX-command-query): Use default parameter of
`completing-read'.
+ * tex.el (TeX-insert-macro): Use default parameter of
+ `completing-read'.
+
+ * latex.el (LaTeX-environment, TeX-arg-document): Use default
+ parameter of `completing-read'.
+
2014-01-22 Tassilo Horn <[email protected]>
* style/shortvrb.el (LaTeX-shortvrb-chars): Move from
diff --git a/latex.el b/latex.el
index e6ce62c..0ed4bcf 100644
--- a/latex.el
+++ b/latex.el
@@ -1830,9 +1830,7 @@ OPTIONAL and IGNORE are ignored."
LaTeX-style-list))
(setq style (completing-read
(concat "Document class: (default " LaTeX-default-style ") ")
- LaTeX-global-class-files))
- (if (zerop (length style))
- (setq style LaTeX-default-style))
+ LaTeX-global-class-files nil nil nil nil LaTeX-default-style))
;; Clean up hook before use.
(setq TeX-after-document-hook nil)
(TeX-run-style-hooks style)
diff --git a/tex-buf.el b/tex-buf.el
index e6a3249..a7ea52c 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -438,7 +438,7 @@ ORIGINALS which are modified but not saved yet."
(completing-read
(concat "Command: (default " default ") ")
(TeX-mode-specific-command-list major-mode) nil t
- nil 'TeX-command-history))))
+ nil 'TeX-command-history default))))
;; If the answer is "latex" it will not be expanded to "LaTeX"
(setq answer (car-safe (TeX-assoc answer TeX-command-list)))
(if (and answer
diff --git a/tex.el b/tex.el
index 07c452e..040acba 100644
--- a/tex.el
+++ b/tex.el
@@ -2710,11 +2710,9 @@ is called with \\[universal-argument]."
"): "
TeX-esc)
(TeX-symbol-list-filtered) nil nil nil
- 'TeX-macro-history)))
- (cond ((string-equal symbol "")
- (setq symbol TeX-default-macro))
- ((interactive-p)
- (setq TeX-default-macro symbol)))
+ 'TeX-macro-history TeX-default-macro)))
+ (when (interactive-p)
+ (setq TeX-default-macro symbol))
(TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list))))
(run-hooks 'TeX-after-insert-macro-hook))