emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex fcaef6b 11/80: Improve fontification of \href ma


From: Tassilo Horn
Subject: [elpa] externals/auctex fcaef6b 11/80: Improve fontification of \href macro
Date: Wed, 16 Oct 2019 11:07:07 -0400 (EDT)

branch: externals/auctex
commit fcaef6bab89e6a629d60f1b43038a2433e34fbd5
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Improve fontification of \href macro
    
    * style/hyperref.el ("hyperref"): Add "href" to
    `LaTeX-verbatim-macros-with-braces-local'.
    Check for feature font-latex and not for functions.
    Declare and use `font-latex-update-font-lock' instead of
    `font-latex-set-syntactic-keywords'.
---
 style/hyperref.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/style/hyperref.el b/style/hyperref.el
index 02d886e..3b25491 100644
--- a/style/hyperref.el
+++ b/style/hyperref.el
@@ -1,6 +1,6 @@
 ;;; hyperref.el --- AUCTeX style for `hyperref.sty' v6.83m
 
-;; Copyright (C) 2008, 2013--2016, 2018 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2013--2019 Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli <address@hidden>
 ;; Maintainer: address@hidden
@@ -35,6 +35,10 @@
                  "font-latex"
                  (keywords class))
 
+(declare-function font-latex-update-font-lock
+                 "font-latex"
+                 (&optional syntactic-kws))
+
 (defvar LaTeX-hyperref-package-options-list
   '(;; See https://www.tug.org/applications/hyperref/manual.html#x1-40003
     ;; General options
@@ -286,6 +290,7 @@
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage")
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperref")
+   (add-to-list 'LaTeX-verbatim-macros-with-braces-local "href")
 
    ;; In hyperref package, \url macro is redefined and \url|...| can't be used,
    ;; while it's possible when only url package (required by hyperref) is 
loaded
@@ -293,8 +298,7 @@
         (remove "url"  LaTeX-verbatim-macros-with-delims-local))
 
    ;; Fontification
-   (when (and (fboundp 'font-latex-add-keywords)
-             (fboundp 'font-latex-set-syntactic-keywords)
+   (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("href" "[{{")
                                ("nolinkurl" "{")
@@ -312,7 +316,7 @@
      (font-latex-add-keywords '(("hypersetup" "{"))
                              'function)
      ;; For syntactic fontification, e.g. verbatim constructs.
-     (font-latex-set-syntactic-keywords))
+     (font-latex-update-font-lock t))
 
    ;; Option management
    (if (and (LaTeX-provided-package-options-member "hyperref" "dvipdfmx")



reply via email to

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