[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f84b1a5f 1/5: Simplify implementation of style/ifthen.el
From: |
Arash Esbati |
Subject: |
master f84b1a5f 1/5: Simplify implementation of style/ifthen.el |
Date: |
Tue, 13 Dec 2022 06:33:00 -0500 (EST) |
branch: master
commit f84b1a5fdbb9cccebf3f6831973ea29d6725ef2c
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Simplify implementation of style/ifthen.el
* style/ifthen.el (LaTeX-ifthen-test): New variable.
(LaTeX-arg-ifthen-test): Delete and move the functionality into
the hook.
---
style/ifthen.el | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/style/ifthen.el b/style/ifthen.el
index 6610f88e..0650975e 100644
--- a/style/ifthen.el
+++ b/style/ifthen.el
@@ -31,33 +31,29 @@
;;; Code:
(require 'tex)
+(require 'latex)
;; Silence the compiler:
(declare-function font-latex-add-keywords
"font-latex"
(keywords class))
-(defun LaTeX-arg-ifthen-test (optional &optional prompt)
- "Query and insert skeleton for a test in ifthen macros."
- (TeX-argument-insert
- (completing-read
- (TeX-argument-prompt optional prompt "Test")
- '("<" "=" ">"
- "\\isodd{}"
- "\\isundefined{}"
- "\\equal{}{}"
- "\\lengthtest{<}"
- "\\lengthtest{=}"
- "\\lengthtest{>}"
- "\\boolean{}"))
- optional))
+(defvar LaTeX-ifthen-test '("<" "=" ">"
+ "\\isodd{}"
+ "\\isundefined{}"
+ "\\equal{}{}"
+ "\\lengthtest{<}"
+ "\\lengthtest{=}"
+ "\\lengthtest{>}"
+ "\\boolean{}")
+ "List of tests in ifthen macros.")
(TeX-add-style-hook
"ifthen"
(lambda ()
(TeX-add-symbols
- '("ifthenelse" LaTeX-arg-ifthen-test t nil)
- '("whiledo" LaTeX-arg-ifthen-test t)
+ '("ifthenelse" (TeX-arg-completing-read LaTeX-ifthen-test "Test") t nil)
+ '("whiledo" (TeX-arg-completing-read LaTeX-ifthen-test "Test") t)
"AND"
"OR"
"NOT"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f84b1a5f 1/5: Simplify implementation of style/ifthen.el,
Arash Esbati <=