[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 8f70cd5211 14/48: Simplify implementation of sty
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 8f70cd5211 14/48: Simplify implementation of style/ulem.el |
Date: |
Fri, 18 Nov 2022 14:27:43 -0500 (EST) |
branch: externals/auctex
commit 8f70cd521184481b7256d1dd1a1d86c814b76a33
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Simplify implementation of style/ulem.el
* style/ulem.el (LaTeX-ulem-fontdecl, LaTeX-ulem-fontcmd)
(TeX-arg-ulem-fontdecl, TeX-arg-ulem-fontcmd)
(TeX-arg-ulem-useunder): Remove variables and functions.
("ulem"): Move the functionality into the style hook.
---
style/ulem.el | 56 ++++++++++++--------------------------------------------
1 file changed, 12 insertions(+), 44 deletions(-)
diff --git a/style/ulem.el b/style/ulem.el
index fa9cefb066..f2383e2024 100644
--- a/style/ulem.el
+++ b/style/ulem.el
@@ -57,8 +57,18 @@
;; \useunder {underline_command}{font_declaration}{font_command}
;; replaces occurences of font_declaration and font_command with the
;; underline_command
- '("useunder" TeX-arg-ulem-useunder
- TeX-arg-ulem-fontdecl TeX-arg-ulem-fontcmd))
+ '("useunder"
+ (TeX-arg-completing-read ("\\uline" "\\uuline" "\\uwave" "\\sout"
+ "\\xout" "\\dashuline" "\\dotuline")
+ "Underline command")
+ (TeX-arg-completing-read ("\\itshape" "\\bfseries" "\\scshape"
+ "\\ttfamily" "\\upshape" "\\mdseries"
+ "\\rmfamily" "\\sffamily" "\\slshape")
+ "Font declaration")
+ (TeX-arg-completing-read ("\\textit" "\\textbf" "\\textsc"
+ "\\texttt" "\\textup" "\\textmd"
+ "\\textrm" "\\textsf" "\\textsl")
+ "Font command")))
;; \ULdepth can be changed with \setlength
(LaTeX-add-lengths "ULdepth")
@@ -80,48 +90,6 @@
'underline-command)))
TeX-dialect)
-(defvar LaTeX-ulem-fontdecl
- (mapcar (lambda (str) (concat "\\" str))
- '("itshape" "bfseries" "scshape"
- "ttfamily" "upshape" "mdseries"
- "rmfamily" "sffamily" "slshape"))
- "List of font declaration commands in LaTeX.")
-
-(defvar LaTeX-ulem-fontcmd
- (mapcar (lambda (str) (concat "\\" str))
- '("textit" "textbf" "textsc"
- "texttt" "textup" "textmd"
- "textrm" "textsf" "textsl"))
- "List of font commands in LaTeX")
-
-(defun TeX-arg-ulem-fontdecl (optional &optional prompt)
- "Prompt for the font-declaration un \\useunder."
- (TeX-argument-insert
- (completing-read (TeX-argument-prompt
- optional prompt "Font declaration")
- LaTeX-ulem-fontdecl nil t)
- optional))
-
-(defun TeX-arg-ulem-fontcmd (optional &optional prompt)
- "Prompt for the font-declaration un \\useunder."
- (TeX-argument-insert
- (completing-read (TeX-argument-prompt
- optional prompt "Font command")
- LaTeX-ulem-fontcmd nil t)
- optional))
-
-;; adapted from url.el: TeX-arg-urlstyle
-(defun TeX-arg-ulem-useunder (optional &optional prompt)
- "Prompt for underline command used in \\useunder."
- (TeX-argument-insert
- (completing-read (TeX-argument-prompt optional prompt "Underline command")
- (mapcar (lambda (str) (concat "\\" str))
- '("uline" "uuline"
- "uwave" "sout" "xout"
- "dashuline" "dotuline"))
- nil t)
- optional))
-
(defvar LaTeX-ulem-package-options
'("UWforbf" "ULforem" "normalbf" "normalem")
"Package options for the ulem package.")
- [elpa] externals/auctex updated (c569c7d486 -> 93430d7ab0), Tassilo Horn, 2022/11/18
- [elpa] externals/auctex d7e6fa0d41 05/48: Cleanup `TeX-insert-dollar', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex cdf57fba58 11/48: * latex.el (TeX-arg-conditional): Declare 'indent'., Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 8f70cd5211 14/48: Simplify implementation of style/ulem.el,
Tassilo Horn <=
- [elpa] externals/auctex 4eaed332ba 26/48: Add new hooks for inserting environments with arguments, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex a0ba387b2c 23/48: ; Trivial cleanups, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 8775c8355f 13/48: Replace `TeX-arg-url-urlstyle' in style/url.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex d3970b77da 09/48: ; * latex.el (LaTeX-common-initialization): Remove dupe textcircled., Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 52a7f4050f 27/48: ; * doc/auctex.texi (Adding Environments): Adjust indentation., Tassilo Horn, 2022/11/18
- [elpa] externals/auctex c0c9556338 30/48: Don't insert empty node name, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex e53bb19a90 37/48: ; Recognize large arguments with many lines, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 52738d11b2 39/48: Remove entry in `LaTeX-completion-function-map-alist-keyval', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex d5ff42e0bd 34/48: Simplify implementation of style/enumitem.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex cb7b44227d 31/48: Improve fontification of indexing macros, Tassilo Horn, 2022/11/18