unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: josh@foxtail.org, 13891@debbugs.gnu.org
Subject: bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion
Date: Wed, 03 Apr 2013 18:55:27 -0400	[thread overview]
Message-ID: <jwvmwtfxm98.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87k3ono8gv.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 31 Mar 2013 21:41:12 +0530")

>>> 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





  reply	other threads:[~2013-04-03 22:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 17:21 bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion Josh
2013-03-06 19:10 ` Jambunathan K
2013-03-18  7:35   ` Jambunathan K
2013-03-18 14:47     ` Josh
2013-03-31 13:36 ` Stefan Monnier
2013-03-31 16:11   ` Jambunathan K
2013-04-03 22:55     ` Stefan Monnier [this message]
2013-04-04 15:46       ` Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvmwtfxm98.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=13891@debbugs.gnu.org \
    --cc=josh@foxtail.org \
    --cc=kjambunathan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).