auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8775c835 6/7: Replace `TeX-arg-url-urlstyle' in style/url.el


From: Arash Esbati
Subject: master 8775c835 6/7: Replace `TeX-arg-url-urlstyle' in style/url.el
Date: Thu, 3 Nov 2022 18:04:57 -0400 (EDT)

branch: master
commit 8775c8355f49cdb0051f063bf723261ecf2d8c78
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Replace `TeX-arg-url-urlstyle' in style/url.el
    
    * style/url.el (TeX-arg-url-urlstyle): Delete function.
    ("url"): Move the functionality into the style hook.
---
 style/url.el | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/style/url.el b/style/url.el
index af524bf6..e1bac616 100644
--- a/style/url.el
+++ b/style/url.el
@@ -1,6 +1,6 @@
 ;;; url.el --- AUCTeX style for `url.sty'  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2004-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2004-2022  Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
 ;; Maintainer: auctex-devel@gnu.org
@@ -115,16 +115,6 @@
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-url-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
-(defun TeX-arg-url-urlstyle (optional &optional prompt)
-  "Prompt for style used in \\urlstyle with completion.
-If OPTIONAL is non-nil, indicate it in the minibuffer during the
-query and insert the result in brackets.  PROMPT replaces the
-standard one."
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt optional prompt "Style")
-                    '("rm" "same" "sf" "tt"))
-   optional))
-
 (defun TeX-arg-url-DeclareUrlCommand (optional &optional prompt)
   "Prompt for arguments of \\DeclareUrlCommand with completion.
 If OPTIONAL is non-nil, indicate it in the minibuffer during the
@@ -181,12 +171,13 @@ standard one."
     ;; "hyperref" redefines \url so that the argument is only in
     ;; braces.  We check here if hyperref is loaded:
     '("url" (TeX-arg-conditional (member "hyperref" (TeX-style-list))
-                                 ("Url")
-                                 ((TeX-arg-verb-delim-or-brace "Url"))))
+                ("Url")
+              ((TeX-arg-verb-delim-or-brace "Url"))))
 
     '("urldef" TeX-arg-url-urldef)
 
-    '("urlstyle" TeX-arg-url-urlstyle))
+    '("urlstyle" (TeX-arg-completing-read ("rm" "same" "sf" "tt")
+                                          "Style")))
 
    ;; For '\path', use the facilities provided by this style.  Also
    ;; don't add "path" for fontification below since



reply via email to

[Prev in Thread] Current Thread [Next in Thread]