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 [EMACS_22_BASE]


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/font-lock.el,v [EMACS_22_BASE]
Date: Mon, 11 Jun 2007 21:57:13 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Stefan Monnier <monnier>        07/06/11 21:57:12

Index: lisp/font-lock.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/font-lock.el,v
retrieving revision 1.317
retrieving revision 1.317.2.1
diff -u -b -r1.317 -r1.317.2.1
--- lisp/font-lock.el   21 Apr 2007 14:30:25 -0000      1.317
+++ lisp/font-lock.el   11 Jun 2007 21:57:11 -0000      1.317.2.1
@@ -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]