branch: externals/auctex commit 7c15b32d06b28dd0ddceb77a02fe71a0a666e9c0 Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
Simplify implementation of style/ltugboat.el * style/ltugboat.el (LaTeX-env-ltugboat-verbatim): Remove function and move the functionality into the hook. --- style/ltugboat.el | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/style/ltugboat.el b/style/ltugboat.el index 92811ddec7..67d58e6378 100644 --- a/style/ltugboat.el +++ b/style/ltugboat.el @@ -40,23 +40,6 @@ "font-latex" (keywords class)) -(defun LaTeX-env-ltugboat-verbatim (environment) - "Insert verbatim environment with an optional argument." - (let* ((crm-separator (regexp-quote TeX-esc)) - (opts (mapconcat #'identity - (TeX-completing-read-multiple - (TeX-argument-prompt t nil "command(s)") - '("\\tiny" "\\scriptsize" "\\footnotesize" - "\\small" "\\normalsize" "\\large" - "\\Large" "\\LARGE" "\\huge" - "\\Huge" "\\makevmeta" "\\ruled") - nil nil TeX-esc) - TeX-esc))) - (LaTeX-insert-environment environment - (when (and opts - (not (string= opts ""))) - (concat LaTeX-optop opts LaTeX-optcl))))) - (TeX-add-style-hook "ltugboat" (lambda () @@ -106,7 +89,14 @@ ;; 8 Verbatim text (LaTeX-add-environments - '("verbatim" LaTeX-env-ltugboat-verbatim)) + `("verbatim" LaTeX-env-args + [TeX-arg-completing-read-multiple ("tiny" "scriptsize" "footnotesize" + "small" "normalsize" "large" + "Large" "LARGE" "huge" + "Huge" "makevmeta" "ruled") + "Command(s)" nil nil + ,(regexp-quote TeX-esc) + ,TeX-esc nil nil nil nil ,TeX-esc])) ;; 10.1 Acronyms and logos (TeX-add-symbols