[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex dc6e8c44c9 72/76: Turn `y-or-n-p' into `always'
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex dc6e8c44c9 72/76: Turn `y-or-n-p' into `always' for in-buffer completion |
Date: |
Fri, 13 Jan 2023 14:31:07 -0500 (EST) |
branch: externals/auctex
commit dc6e8c44c988ec4824266b01d89b66375ef14a3c
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Turn `y-or-n-p' into `always' for in-buffer completion
* latex.el (LaTeX-completion-parse-args): Turn `y-or-n-p' into
`always' inside `TeX-arg-conditional' for in-buffer completion.
---
latex.el | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/latex.el b/latex.el
index 7c29306642..56992d54fb 100644
--- a/latex.el
+++ b/latex.el
@@ -7574,17 +7574,22 @@ or `LaTeX-environment-list' and returns it."
(pop arg-list))
;; Check for `TeX-arg-conditional' here and change `arg-list'
- ;; accordingly
+ ;; accordingly.
+ ;; FIXME: Turn `y-or-n-p' into `always' otherwise there will be a
+ ;; query during in-buffer completion. This will work for most
+ ;; cases, but will also fail for example in hyperref.el. This
+ ;; decision should revisited at a later stage:
(when (assq 'TeX-arg-conditional arg-list)
- (while (and arg-list
- (setq arg (car arg-list)))
- (if (and (listp arg) (eq (car arg) 'TeX-arg-conditional))
- (setq result (append (reverse (if (eval (nth 1 arg) t)
- (nth 2 arg)
- (nth 3 arg)))
- result))
- (push arg result))
- (pop arg-list))
+ (cl-letf (((symbol-function 'y-or-n-p) #'always))
+ (while (and arg-list
+ (setq arg (car arg-list)))
+ (if (and (listp arg) (eq (car arg) 'TeX-arg-conditional))
+ (setq result (append (reverse (if (eval (nth 1 arg) t)
+ (nth 2 arg)
+ (nth 3 arg)))
+ result))
+ (push arg result))
+ (pop arg-list)))
(setq arg-list (nreverse result)))
;; Now parse the `arg-list':
- [elpa] externals/auctex 358b4d0785 76/76: Merge remote-tracking branch 'origin/master' into externals/auctex, (continued)
- [elpa] externals/auctex 358b4d0785 76/76: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 2664170ecc 37/76: Update style/fvextra.el to package version 1.5, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 5f129b5dca 58/76: Support starred variant name, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex e97fb94f4e 62/76: Pacify compiler warning, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex bf66b302a4 61/76: Improve the previous commit slightly, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex b7b498baad 40/76: Simplify implementation of style/graphicx.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 7f9e7ec8a1 05/76: * style/array.el ("array"): Replace `TeX-arg-eval' with a closure., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 1a72c0f884 32/76: Simplify implementation of style/floatrow.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex ac7ad4fff4 36/76: Simplify implementation of style/footmisc.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 33bb54bb9e 38/76: Simplify implementation of style/geometry.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex dc6e8c44c9 72/76: Turn `y-or-n-p' into `always' for in-buffer completion,
Tassilo Horn <=
- [elpa] externals/auctex e4ceb88bb7 14/76: Bind a value to `LaTeX-current-environment' locally, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 4b9dafad86 29/76: Simplify implementation of style/fancyvrb.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 982b20571c 48/76: * style/ltxdoc.el ("ltxdoc"): Replace `TeX-arg-eval'., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 46c1a5a592 63/76: Add filename as a prefix to catchfilebetweentags counter, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 2d0fdebac0 69/76: Preserve braces after @TeX and similar macros., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 30bca31f77 71/76: ; * style/xcolor.el ("xcolor"): Replace `TeX-arg-eval'., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 643d39a10c 75/76: Update Pygments style names, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 3806176ba2 56/76: Fix argument description in doc strings, Tassilo Horn, 2023/01/13