* lisp/hi-lock.el (hi-lock-mode): Cleanup after revert-buffer.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 31 Mar 2013 13:34:35 +0000 (09:34 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 31 Mar 2013 13:34:35 +0000 (09:34 -0400)
Fixes: debbugs:13891

lisp/ChangeLog
lisp/hi-lock.el

index ced7672..9a47125 100644 (file)
@@ -1,3 +1,7 @@
+2013-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * hi-lock.el (hi-lock-mode): Cleanup after revert-buffer (bug#13891).
+
 2013-03-30  Fabián Ezequiel Gallina  <fabian@anue.biz>
 
        Un-indent after "pass" and "return" statements (Bug#13888)
index 38e5e8a..e2dc4ea 100644 (file)
@@ -389,7 +389,9 @@ versions before 22 use the following in your init file:
        (define-key-after menu-bar-edit-menu [hi-lock]
          (cons "Regexp Highlighting" hi-lock-menu))
        (hi-lock-find-patterns)
-       (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook nil t))
+        (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook nil t)
+        ;; Remove regexps from font-lock-keywords (bug#13891).
+       (add-hook 'change-major-mode-hook (lambda () (hi-lock-mode -1)) nil t))
     ;; Turned off.
     (when (or hi-lock-interactive-patterns
              hi-lock-file-patterns)