










* latex.el (LaTeX-env-figure): Use `format-prompt' and the DEFAULT-VALUE argument of `TeX-read-string' which leaves the minibuffer empty during the query. Fix comments. * style/floatrow.el (LaTeX-floatrow-env-figure): * style/revtex4-2.el (LaTeX-env-revtex4-2-video): Adjust accordingly.
diff --git a/latex.el b/latex.el
index bccc0d1ef3d..69ff6d8f7b6 100644
--- a/latex.el
+++ b/latex.el
@@ -1229,9 +1229,10 @@ If SHORT-CAPTION is non-nil pass it as an optional argument to
(defun LaTeX-env-figure (environment)
"Create ENVIRONMENT with \\caption and \\label commands."
- (let* ((float (and LaTeX-float ; LaTeX-float can be nil, i.e.
- ; do not prompt
- (TeX-read-string "(Optional) Float position: " LaTeX-float)))
+ (let* ((float (and LaTeX-float ;; `LaTeX-float' can be nil, i.e., do not prompt
+ (TeX-read-string
+ (format-prompt "(Optional) Float position" LaTeX-float)
+ nil nil LaTeX-float)))
(caption (TeX-read-string "Caption: "))
(short-caption (when (>= (length caption) LaTeX-short-caption-prompt-length)
(TeX-read-string "(Optional) Short caption: ")))
@@ -8221,8 +8222,8 @@ function `TeX--completion-at-point' which should come later in
;; The next defcustom and functions control the annotation of labels
;; during in-buffer completion which is done by
-;; `TeX--completion-at-point' also inside the arguments of \ref and
-;; such and not with the code above.
+;; `TeX--completion-at-point' inside the arguments of \ref and such as
+;; well as with `TeX-arg-ref'
(defcustom LaTeX-label-annotation-max-length 30
"Maximum number of characters for annotation of labels.
@@ -423,10 +423,10 @@ entries are available under \"rawfigure*?\" and \"rawtable*?\"."
(defun LaTeX-floatrow-env-figure (environment)
"Create floating ENVIRONMENT suitable for floatrow macros."
- (let ((float (and LaTeX-float
+ (let ((float (and LaTeX-float ;; LaTeX-float can be nil, i.e., do not prompt
(TeX-read-string
- (TeX-argument-prompt t nil "Float position")
- LaTeX-float))))
+ (format-prompt "(Optional) Float position" LaTeX-float)
+ nil nil LaTeX-float))))
(LaTeX-insert-environment environment
(unless (zerop (length float))
(concat LaTeX-optop float LaTeX-optcl)))))
@@ -45,10 +45,10 @@
"Create ENVIRONMENT with \\caption and \\label commands.
This function is meant to be used for \"video\" environment
provided by REVTeX class."
- (let* ((float (and LaTeX-float ; LaTeX-float can be nil, i.e. do not prompt
+ (let* ((float (and LaTeX-float ;; LaTeX-float can be nil, i.e., do not prompt
(TeX-read-string
- (TeX-argument-prompt t nil "Float position")
- LaTeX-float)))
+ (format-prompt "(Optional) Float position" LaTeX-float)
+ nil nil LaTeX-float)))
(caption (TeX-read-string
(TeX-argument-prompt nil nil "Caption")))
(short-caption (when (>= (length caption) LaTeX-short-caption-prompt-length)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。