From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion Date: Wed, 03 Apr 2013 18:55:27 -0400 Message-ID: References: <87k3ono8gv.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365029768 29712 80.91.229.3 (3 Apr 2013 22:56:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Apr 2013 22:56:08 +0000 (UTC) Cc: josh@foxtail.org, 13891@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 04 00:56:35 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UNWba-0005Yb-8N for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Apr 2013 00:56:34 +0200 Original-Received: from localhost ([::1]:53251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNWbB-0002wi-EJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Apr 2013 18:56:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNWb3-0002wX-8V for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2013 18:56:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNWay-0002Z7-N2 for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2013 18:56:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNWay-0002Z2-Jq for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2013 18:55:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UNWdy-0000jx-94 for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2013 18:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Apr 2013 22:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13891 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13891-submit@debbugs.gnu.org id=B13891.13650299202805 (code B ref 13891); Wed, 03 Apr 2013 22:59:02 +0000 Original-Received: (at 13891) by debbugs.gnu.org; 3 Apr 2013 22:58:40 +0000 Original-Received: from localhost ([127.0.0.1]:60705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNWda-0000jB-6w for submit@debbugs.gnu.org; Wed, 03 Apr 2013 18:58:38 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:53208) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNWdX-0000j1-CB for 13891@debbugs.gnu.org; Wed, 03 Apr 2013 18:58:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="6429521" Original-Received: from 69-196-180-174.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Apr 2013 18:55:25 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C6DC2AE3CB; Wed, 3 Apr 2013 18:55:27 -0400 (EDT) In-Reply-To: <87k3ono8gv.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 31 Mar 2013 21:41:12 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73131 Archived-At: >>> 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. > (This is not a comment on the patch you have put in, but my initial > thoughts as I investigated the bug.) > I have a feeling that your fix is "inconsistent" with having > `hi-lock-interactive-patterns' as `permanent-local'. Agreed. Even more so for hi-lock-file-patterns. > With `global-hi-lock-mode' ON, you will notice that highlighting will > be retained across reverts. Not any more after my patch. > 2. I think `font-lock-fontify-buffer' should be added to > `hi-lock-font-lock-hook'. Why? > For some reason, `hi-lock-font-lock-hook' doesn't get called at all > (even though it is added to the `font-lock-mode-hook'.) What was your test case? > Problem area: `font-lock-mode-hook' is not documented and I really > don't when it is getting called. font-lock-mode is a normal minor-mode, so font-lock-mode-hook is called at the end of running font-lock-mode (both to enable and to disable it). Stefan