[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex d1d1bd819d 47/77: Control the opening and closin
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex d1d1bd819d 47/77: Control the opening and closing braces during insertion |
Date: |
Fri, 26 Aug 2022 16:06:36 -0400 (EDT) |
branch: externals/auctex
commit d1d1bd819db36f2100647c4a63fa1de3adc511c4
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Control the opening and closing braces during insertion
* latex.el (TeX-arg-completing-read)
(TeX-arg-completing-read-multiple): Add parameters to set the
values of `TeX-arg-opening-brace' and `TeX-arg-closing-brace'
during the argument insertion.
(TeX-read-completing-read, TeX-read-completing-read-multiple):
Escape the single quotes in docstrings correctly.
---
latex.el | 46 +++++++++++++++++++++++++++-------------------
1 file changed, 27 insertions(+), 19 deletions(-)
diff --git a/latex.el b/latex.el
index 92ae9680a8..c32c8ed59f 100644
--- a/latex.el
+++ b/latex.el
@@ -3264,7 +3264,7 @@ COLLECTION provides elements for completion and is passed
to
- A symbol returning a list
- A function call
-PROMPT replaces the standard one where ' (cr): ' is appended to
+PROMPT replaces the standard one where \\=' (cr): \\=' is appended to
it. If you want the full control over the prompt, set COMPLETE
to non-nil and then provide a full PROMPT.
@@ -3291,22 +3291,26 @@ INHERIT-INPUT-METHOD are passed to `completing-read',
which see."
predicate require-match initial-input hist def inherit-input-method))
(defun TeX-arg-completing-read (optional collection &optional prompt complete
- prefix predicate require-match
+ prefix leftbrace rightbrace
+ predicate require-match
initial-input hist def
inherit-input-method)
"Read a string in the minibuffer, with completion and insert it.
If OPTIONAL is non-nil, indicate it in the minibuffer and insert
-the result in brackets if not empty.
+the result in brackets if not empty. The brackets used are
+controlled by the string values of LEFTBRACE and RIGHTBRACE.
For PROMPT and COMPLETE, refer to `TeX-read-completing-read'.
For PREFIX, see `TeX-argument-insert'.
PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF and
INHERIT-INPUT-METHOD are passed to `completing-read', which see."
- (TeX-argument-insert
- (TeX-read-completing-read optional collection prompt complete
- predicate require-match initial-input
- hist def inherit-input-method)
- optional prefix))
+ (let ((TeX-arg-opening-brace (or leftbrace TeX-arg-opening-brace))
+ (TeX-arg-closing-brace (or rightbrace TeX-arg-closing-brace)))
+ (TeX-argument-insert
+ (TeX-read-completing-read optional collection prompt complete
+ predicate require-match initial-input
+ hist def inherit-input-method)
+ optional prefix)))
(defun TeX-read-completing-read-multiple (optional table &optional prompt
complete
predicate require-match
@@ -3321,7 +3325,7 @@ COLLECTION provides elements for completion and is passed
to
- A symbol returning a list
- A function call
-PROMPT replaces the standard one where ' (crm): ' is appended to
+PROMPT replaces the standard one where \\=' (crm): \\=' is appended to
it. If you want the full control over the prompt, set COMPLETE
to non-nil and then provide a full PROMPT.
@@ -3349,26 +3353,30 @@ INHERIT-INPUT-METHOD are passed to
predicate require-match initial-input hist def inherit-input-method))
(defun TeX-arg-completing-read-multiple (optional table &optional prompt
complete
- prefix predicate
require-match
+ prefix leftbrace rightbrace
+ predicate require-match
initial-input hist def
inherit-input-method)
"Read multiple strings in the minibuffer, with completion and insert them.
If OPTIONAL is non-nil, indicate it in the minibuffer and insert
-the result in brackets if not empty.
+the result in brackets if not empty. The brackets used are
+controlled by the string values of LEFTBRACE and RIGHTBRACE.
For PROMPT and COMPLETE, refer to `TeX-read-completing-read-multiple'.
For PREFIX, see `TeX-argument-insert'.
PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF and
INHERIT-INPUT-METHOD are passed to
`TeX-completing-read-multiple', which see."
- (TeX-argument-insert
- (mapconcat #'identity
- (TeX-read-completing-read-multiple optional table prompt
- complete predicate
- require-match initial-input
- hist def inherit-input-method)
- ",")
- optional prefix))
+ (let ((TeX-arg-opening-brace (or leftbrace TeX-arg-opening-brace))
+ (TeX-arg-closing-brace (or rightbrace TeX-arg-closing-brace)))
+ (TeX-argument-insert
+ (mapconcat #'identity
+ (TeX-read-completing-read-multiple optional table prompt
+ complete predicate
+ require-match initial-input
+ hist def
inherit-input-method)
+ ",")
+ optional prefix)))
(defun TeX-read-hook ()
"Read a LaTeX hook and return it as a string."
- [elpa] externals/auctex 60ca36b5a1 39/77: ; * .gitignore: Exclude temp files produced by 2022-06-01 kernel., (continued)
- [elpa] externals/auctex 60ca36b5a1 39/77: ; * .gitignore: Exclude temp files produced by 2022-06-01 kernel., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex d1f2c2cdb2 41/77: Add new style/proc.el, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 054b38887b 42/77: Fix (void-variable compilation-in-progress) error, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex b24dcb4feb 40/77: Track changes in LaTeX kernel 2022-06-01, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 4163bb5c42 66/77: Fix `autoconf` warnings, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex ead30464d8 64/77: * style/listings.el (TeX-add-style-hook): Update fontification., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 7d7e563862 34/77: * doc/changes.texi: Add NEWS item for the previous commit., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 6e25d11aa6 44/77: Add comment, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 4a3d7a2dc2 60/77: Suppress indentation of verbatim env's in docTeX-mode, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex ce4bb7c1b6 58/77: ; * style/doc.el: Delete spurious `declare-function'., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex d1d1bd819d 47/77: Control the opening and closing braces during insertion,
Tassilo Horn <=
- [elpa] externals/auctex 23f4040c9d 57/77: Add new test, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 04b9a6d1f9 56/77: Improve shortvrb.sty support, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 33a01b6928 59/77: Extend test for filling, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex cb0a1e6be1 72/77: Improve function calls to retrieve key=vals in style hooks, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex e194656ce2 28/77: Let RefTeX recognize labels in user defined environments, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 64a8e189a3 19/77: Remove compatibility code, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 6fe2f21e96 31/77: ; Fix warnings about single quotes in docstrings, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 019bcc9cc3 48/77: ; * style/proc.el: Fix a typo., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex d44f83de8b 37/77: Add three new styles, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex a416201f4a 05/77: Delete usage of @key in index entries, Tassilo Horn, 2022/08/26