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

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

[elpa] externals/auctex 4894e78 27/43: Move customizable variable into t


From: Tassilo Horn
Subject: [elpa] externals/auctex 4894e78 27/43: Move customizable variable into tex-style.el
Date: Sat, 11 Apr 2020 15:05:23 -0400 (EDT)

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

    Move customizable variable into tex-style.el
    
    * style/shortvrb.el: Move definition of `LaTeX-shortvrb-chars'
    into `tex-style.el'.
    Delete check for function `font-latex-set-syntactic-keywords' and
    check for feature font-latex instead.
    
    * tex-style.el (LaTeX-shortvrb-chars): Add entry for
    `LaTeX-shortvrb-chars'.
---
 style/shortvrb.el | 33 +++------------------------------
 tex-style.el      | 29 +++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 30 deletions(-)

diff --git a/style/shortvrb.el b/style/shortvrb.el
index b0d8be4..a8cf2a1 100644
--- a/style/shortvrb.el
+++ b/style/shortvrb.el
@@ -1,6 +1,6 @@
 ;;; shortvrb.el --- AUCTeX style for `shortvrb.sty'
 
-;; Copyright (C) 2009, 2014, 2018 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2014, 2018, 2020 Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli <address@hidden>
 ;; Maintainer: address@hidden
@@ -46,43 +46,16 @@
                  "font-latex"
                  (list))
 
-(defcustom LaTeX-shortvrb-chars nil
-  "List of characters toggling verbatim mode.
-When your document uses the shortvrb style and you have a
-\\MakeShortVrb{\\|} in your file to write verbatim text as
-|text|, then set this variable to the list (?|).  Then AUCTeX
-fontifies |text| as verbatim.
-
-Preferably, you should do this buffer-locally using a file
-variable near the end of your document like so:
-
-  %% Local Variables:
-  %% LaTeX-shortvrb-chars: (?|)
-  %% End:
-
-When you customize this variable to a non-nil value, then it
-becomes the default value meaning that verbatim fontification is
-always performed for the characters in the list, no matter if
-your document actually defines shortvrb chars using
-\\MakeShortVrb."
-  :group 'LaTeX-style
-  :type '(repeat character))
-(put 'LaTeX-shortvrb-chars 'safe-local-variable 'listp)
-
 (TeX-add-style-hook
  "shortvrb"
  (lambda ()
    ;; Fontification
    (when (and LaTeX-shortvrb-chars
-             (fboundp 'font-latex-set-syntactic-keywords)
+             (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-to-syntax-alist
       (mapcar (lambda (char) (cons char "|"))
-              LaTeX-shortvrb-chars))))
+             LaTeX-shortvrb-chars))))
  LaTeX-dialect)
 
-;; Don't look for file-local variables before this line, so that the example in
-;; the docstring isn't picked up.
-
-
 ;;; shortvrb.el ends here
diff --git a/tex-style.el b/tex-style.el
index 89dcbbe..4a9eeb7 100644
--- a/tex-style.el
+++ b/tex-style.el
@@ -391,6 +391,31 @@ is initialized to ?v."
   :group 'LaTeX-style
   :type 'character)
 
+;; style/shortvrb.el
+
+(defcustom LaTeX-shortvrb-chars nil
+  "List of characters toggling verbatim mode.
+When your document uses the shortvrb style and you have a
+\\MakeShortVrb{\\|} in your file to write verbatim text as
+|text|, then set this variable to the list (?|).  Then AUCTeX
+fontifies |text| as verbatim.
+
+Preferably, you should do this buffer-locally using a file
+variable near the end of your document like so:
+
+  %% Local Variables:
+  %% LaTeX-shortvrb-chars: (?|)
+  %% End:
+
+When you customize this variable to a non-nil value, then it
+becomes the default value meaning that verbatim fontification is
+always performed for the characters in the list, no matter if
+your document actually defines shortvrb chars using
+\\MakeShortVrb."
+  :group 'LaTeX-style
+  :type '(repeat character))
+(put 'LaTeX-shortvrb-chars 'safe-local-variable 'listp)
+
 ;; style/splitidx.el
 
 (defcustom LaTeX-splitidx-sindex-reftex-quick-id-key ?s
@@ -403,6 +428,10 @@ must be unique.  It is initialized to ?s when added to
   :group 'LaTeX-style
   :type 'character)
 
+;; Don't look for file-local variables before this line, so that the
+;; example in the docstring of `LaTeX-shortvrb-chars' isn't picked up.
+
+
 (provide 'tex-style)
 
 ;;; tex-style.el ends here



reply via email to

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