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

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

[elpa] externals/auctex 66b97ff 20/78: Don't add font-latex-setup to lat


From: Tassilo Horn
Subject: [elpa] externals/auctex 66b97ff 20/78: Don't add font-latex-setup to latex-mode-hook
Date: Mon, 19 Oct 2015 09:10:45 +0000

branch: externals/auctex
commit 66b97ff2b71ca9ed13e691dbc9b51b0f418f183b
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Don't add font-latex-setup to latex-mode-hook
    
    * font-latex.el: Remove code which set up font-latex for use with
    stock latex-mode on load.
---
 ChangeLog     |    5 +++++
 font-latex.el |   34 ++++++++++++++++------------------
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 99973b2..e679b54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-02  Tassilo Horn  <address@hidden>
+
+       * font-latex.el: Remove code which set up font-latex for use with
+       stock latex-mode on load.
+
 2015-09-01  Tassilo Horn  <address@hidden>
 
        * tex-buf.el (TeX-command-sequence): Add argument for processing
diff --git a/font-latex.el b/font-latex.el
index 0bcc039..18c0866 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -506,22 +506,22 @@ Generated by `font-latex-make-match-defun'.")
                         (eval ,face)
                       ,face)
                     limit)))))
-        ((eq type 'declaration)
-         (eval `(defun ,(intern (concat prefix name)) (limit)
-                  ,(concat "Fontify `" prefix name "' up to LIMIT.
+       ((eq type 'declaration)
+        (eval `(defun ,(intern (concat prefix name)) (limit)
+                 ,(concat "Fontify `" prefix name "' up to LIMIT.
 
 Generated by `font-latex-make-match-defun'.")
-                  (when ,(intern (concat prefix name))
-                    (font-latex-match-command-in-braces
-                     ,(intern (concat prefix name)) limit)))))
-        ((eq type 'noarg)
-         (eval `(defun ,(intern (concat prefix name)) (limit)
-                  ,(concat "Fontify `" prefix name "' up to LIMIT.
+                 (when ,(intern (concat prefix name))
+                   (font-latex-match-command-in-braces
+                    ,(intern (concat prefix name)) limit)))))
+       ((eq type 'noarg)
+        (eval `(defun ,(intern (concat prefix name)) (limit)
+                 ,(concat "Fontify `" prefix name "' up to LIMIT.
 
 Generated by `font-latex-make-match-defun'.")
-                  (when ,(intern (concat prefix name))
-                    (re-search-forward
-                     ,(intern (concat prefix name)) limit t)))))))
+                 (when ,(intern (concat prefix name))
+                   (re-search-forward
+                    ,(intern (concat prefix name)) limit t)))))))
 
 (defun font-latex-keyword-matcher (prefix name face type)
   "Return a matcher and highlighter as required by `font-lock-keywords'.
@@ -1982,12 +1982,10 @@ END marks boundaries for searching for quotation ends."
 
 ;;; Installation in non-AUCTeX LaTeX mode
 
-(add-hook 'latex-mode-hook 'font-latex-setup)
-;; If font-latex is loaded using a latex-mode-hook, then the add-hook above
-;; won't be called this time around.  Check for this now:
-(if (eq major-mode 'latex-mode)
-    (font-latex-setup))
-
+;; Here used to be some code which tried to magically make things work and
+;; thereby broke other stuff.  If you want to use font-latex with stock
+;; latex-mode, then please just add `font-lock-setup' to `'latex-mode-hook'
+;; yourself.
 
 ;;; Byte-compilation of generated functions
 



reply via email to

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