emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/font-lock.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/font-lock.el,v
Date: Thu, 14 Jun 2007 09:59:50 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     07/06/14 09:59:49

Index: font-lock.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/font-lock.el,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -b -r1.317 -r1.318
--- font-lock.el        21 Apr 2007 14:30:25 -0000      1.317
+++ font-lock.el        14 Jun 2007 09:59:49 -0000      1.318
@@ -698,6 +698,14 @@
         ;; contain the new keywords.
         (font-lock-update-removed-keyword-alist mode keywords how))
        (t
+         (when (and font-lock-mode
+                    (not (or font-lock-keywords font-lock-defaults)))
+           ;; The major mode has not set any keywords, so when we enabled
+           ;; font-lock-mode it only enabled the font-core.el part, not the
+           ;; font-lock-mode-internal.  Try again.
+           (font-lock-mode -1)
+           (set (make-local-variable 'font-lock-defaults) '(nil t))
+           (font-lock-mode 1))
         ;; Otherwise set or add the keywords now.
         ;; This is a no-op if it has been done already in this buffer
         ;; for the correct major mode.




reply via email to

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