GNU bug report logs - #13891
24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion

Previous Next

Package: emacs;

Reported by: Josh <josh <at> foxtail.org>

Date: Wed, 6 Mar 2013 17:23:01 UTC

Severity: minor

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 13891-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Josh <josh <at> foxtail.org>
Cc: 13891-done <at> debbugs.gnu.org
Subject: Re: bug#13891: 24.3.50;
	highlight-regexp incorrectly retains partial state after buffer
	reversion
Date: Sun, 31 Mar 2013 09:36:21 -0400
> I noticed two things that show that partial highlight-regexp state
> lingers after calling revert-buffer, see items 9 and 12.  After buffer

I've installed the patch below which should fix those problems.


        Stefan


=== modified file 'lisp/hi-lock.el'
--- lisp/hi-lock.el	2013-03-08 04:18:16 +0000
+++ lisp/hi-lock.el	2013-03-31 13:31:41 +0000
@@ -389,7 +389,9 @@
 	(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)





This bug report was last modified 12 years and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.