[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 7da1860c2a 26/76: Support starred section names, (continued)
- [elpa] externals/auctex 7da1860c2a 26/76: Support starred section names, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex d937d4035c 16/76: Simplify implementation of style/changelog.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 906e57dfb8 68/76: ; * style/physics.el: Write proper date., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 01f84ce9f5 73/76: Simplify implementation of style/minted.el, 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 c60ed913a0 12/76: ; Remove unnecessary `declare-function', Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 7c15b32d06 47/76: Simplify implementation of style/ltugboat.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 643d39a10c 75/76: Update Pygments style names, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 358b4d0785 76/76: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 4700af5dd4 64/76: ; Delete ineffective string escapes reported by Relint, 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 13c77f998e 28/76: Simplify implementation of style/empheq.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex ff65b9b4d0 65/76: Avoid compiler warnings with long function names, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 324cb5c913 41/76: Simplify implementation of style/hologo.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 3806176ba2 56/76: Fix argument description in doc strings, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 517d5a6e4e 34/76: ; * style/floatrow.el ("floatrow"): Fix last change., 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 d7dc696f47 25/76: * latex.el (LaTeX-env-contents): Add the "nowarn" key., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex c7de94dc94 24/76: Replace `TeX-arg-eval', 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 5c67eb2dfd 07/76: Simplify implementation of style/babel.el, Tassilo Horn, 2023/01/13