aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-06-11 21:57:11 +0000
committerStefan Monnier2007-06-11 21:57:11 +0000
commit72fa3278be1baf255a3027229e28d3574f17601e (patch)
tree234390daacde53806f3936078456d448f887f2e5
parent3a07a00bbf3ae87a87ae54a0336f574b67d45da9 (diff)
downloademacs-72fa3278be1baf255a3027229e28d3574f17601e.tar.gz
emacs-72fa3278be1baf255a3027229e28d3574f17601e.zip
(font-lock-add-keywords): In case font-lock was only
half-activated, forcefully activate it completely.
-rw-r--r--admin/FOR-RELEASE26
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/font-lock.el8
3 files changed, 13 insertions, 26 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index fe226fc7d9e..0f8bd0c4420 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -36,32 +36,6 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem.
36 36
37* BUGS 37* BUGS
38 38
39** hi-lock-mode doesn't always turn on font-lock-mode-internal
40
41From: Alan Mackenzie <acm@muc.de>
42Subject: hi-lock-mode doesn't work with emacs -Q.
43Message-ID: <20070607092651.GA1710@muc.de>
44
45Start emacs -Q. (Emacs 22.1, of course). Visit a new file with:
46
47 C-x C-f foo.txt
48
49. Type this:
50
51 This file is foo.txt.
52
53. Enable hi-lock-mode and make "foo" a highlightable pattern:
54
55 M-x hi-lock-mode
56 C-x w h foo<CR><CR> ; accept the default hi-yellow face.
57
58. This highlights the "foo" yellow, as expected. At the end of the
59line, type:
60
61 foo
62
63. This new "foo" doesn't get highlighted. It should be.
64
65* FIXES FOR EMACS 22.2 39* FIXES FOR EMACS 22.2
66 40
67Here we list small fixes that arrived too late for Emacs 22.1, but 41Here we list small fixes that arrived too late for Emacs 22.1, but
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f5b63f37570..41c902b9a86 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * font-lock.el (font-lock-add-keywords): In case font-lock was only
4 half-activated, forcefully activate it completely.
5
12007-06-11 Richard Stallman <rms@gnu.org> 62007-06-11 Richard Stallman <rms@gnu.org>
2 7
3 * cus-edit.el (custom-variable-type): Doc fix. 8 * cus-edit.el (custom-variable-type): Doc fix.
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index c826a5f20c6..265cc4bf682 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -698,6 +698,14 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
698 ;; contain the new keywords. 698 ;; contain the new keywords.
699 (font-lock-update-removed-keyword-alist mode keywords how)) 699 (font-lock-update-removed-keyword-alist mode keywords how))
700 (t 700 (t
701 (when (and font-lock-mode
702 (not (or font-lock-keywords font-lock-defaults)))
703 ;; The major mode has not set any keywords, so when we enabled
704 ;; font-lock-mode it only enabled the font-core.el part, not the
705 ;; font-lock-mode-internal. Try again.
706 (font-lock-mode -1)
707 (set (make-local-variable 'font-lock-defaults) '(nil t))
708 (font-lock-mode 1))
701 ;; Otherwise set or add the keywords now. 709 ;; Otherwise set or add the keywords now.
702 ;; This is a no-op if it has been done already in this buffer 710 ;; This is a no-op if it has been done already in this buffer
703 ;; for the correct major mode. 711 ;; for the correct major mode.