auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 3b5cea28deb31ec53182d


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 3b5cea28deb31ec53182d80cccadd40b103457a2
Date: Sat, 15 Dec 2018 16:57:44 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  3b5cea28deb31ec53182d80cccadd40b103457a2 (commit)
      from  906ac31426a84d79d1cfb6ad12fd06bd755935aa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3b5cea28deb31ec53182d80cccadd40b103457a2
Author: Arash Esbati <address@hidden>
Date:   Sat Dec 15 22:56:41 2018 +0100

    Improve completion for \url between url.el and hyperref.el
    
    * style/hyperref.el ("hyperref"): Comment the entry for "url"
    since the completion is provided via url.el.
    
    * style/url.el ("url"): Add a conditional to "url" in order to
    check if hyperref.el is loaded and then supply the argument in
    braces.
    Also check for hyperref.el. before adding "url" to
    `LaTeX-verbatim-macros-with-delims-local'.

diff --git a/style/hyperref.el b/style/hyperref.el
index ade5494..5ee8b31 100644
--- a/style/hyperref.el
+++ b/style/hyperref.el
@@ -226,8 +226,9 @@
    (TeX-add-symbols
     '("hypersetup" (TeX-arg-key-val LaTeX-hyperref-package-options-list))
     '("href" [ (TeX-arg-key-val LaTeX-hyperref-href-options) ] "URL" "Text")
-    ;; Supply dummy arg `ignore' to override the entry in url.el.
-    '("url" "URL" ignore)
+    ;; Completion for \url is provided via url.el.  Hence the entry in
+    ;; this style is commented:
+    ;; '("url" "URL" ignore)
     '("nolinkurl" t)
     '("hyperbaseurl" t)
     '("hyperimage" "Image URL" "Text")
diff --git a/style/url.el b/style/url.el
index 24d9441..1f856af 100644
--- a/style/url.el
+++ b/style/url.el
@@ -56,12 +56,20 @@
     "UrlRight"
     "UrlSpecials"
     '("path" (TeX-arg-verb-delim-or-brace "Path"))
-    '("url" (TeX-arg-verb-delim-or-brace "Url"))
+    ;; "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"))))
     "urldef"
     '("urlstyle" TeX-arg-urlstyle))
 
    (add-to-list 'LaTeX-verbatim-macros-with-delims-local "path")
-   (add-to-list 'LaTeX-verbatim-macros-with-delims-local "url")
+   ;; hyperref.el has some code to remove "url" from
+   ;; `LaTeX-verbatim-macros-with-delims-local', but we check here as
+   ;; well if "hyperref" is already loaded:
+   (unless (member "hyperref" (TeX-style-list))
+     (add-to-list 'LaTeX-verbatim-macros-with-delims-local "url"))
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "path")
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "url")
 

-----------------------------------------------------------------------

Summary of changes:
 style/hyperref.el |  5 +++--
 style/url.el      | 12 ++++++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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