all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [elpa] master 2ae5b9c 3/7: swiper.el (swiper-font-lock-ensure): Ignore gnus modes
       [not found] ` <E1Yb5za-0007KV-Oa@vcs.savannah.gnu.org>
@ 2015-03-26 13:43   ` Stefan Monnier
  2015-03-26 13:52     ` Oleh Krehel
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2015-03-26 13:43 UTC (permalink / raw
  To: emacs-devel; +Cc: Oleh Krehel

>    "Ensure the entired buffer is highlighted."
>    (unless (or (derived-mode-p 'magit-mode)
>                (memq major-mode '(package-menu-mode
> +                                 gnus-summary-mode
> +                                 gnus-article-mode
> +                                 gnus-group-mode
>                                   emms-playlist-mode erc-mode)))
>      (if (fboundp 'font-lock-ensure)
>          (font-lock-ensure)

I think you'll want to list many more modes here.  Or rather, I think
what you really want to test is whether font-lock is in use on
this buffer.
There are various ways to test it, such as testing the value of
font-lock-fontified or font-lock-mode, or calling font-lock-specified-p,
and there might be others.


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [elpa] master 2ae5b9c 3/7: swiper.el (swiper-font-lock-ensure): Ignore gnus modes
  2015-03-26 13:43   ` [elpa] master 2ae5b9c 3/7: swiper.el (swiper-font-lock-ensure): Ignore gnus modes Stefan Monnier
@ 2015-03-26 13:52     ` Oleh Krehel
  2015-03-26 15:24       ` Tassilo Horn
  0 siblings, 1 reply; 4+ messages in thread
From: Oleh Krehel @ 2015-03-26 13:52 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

On Thu, Mar 26, 2015 at 2:43 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>>    "Ensure the entired buffer is highlighted."
>>    (unless (or (derived-mode-p 'magit-mode)
>>                (memq major-mode '(package-menu-mode
>> +                                 gnus-summary-mode
>> +                                 gnus-article-mode
>> +                                 gnus-group-mode
>>                                   emms-playlist-mode erc-mode)))
>>      (if (fboundp 'font-lock-ensure)
>>          (font-lock-ensure)
>
> I think you'll want to list many more modes here.  Or rather, I think
> what you really want to test is whether font-lock is in use on
> this buffer.
> There are various ways to test it, such as testing the value of
> font-lock-fontified or font-lock-mode, or calling font-lock-specified-p,
> and there might be others.

But what is the cause of discoloration when I call `font-lock-ensure`?

For instance, in `gnus-group-mode`, `font-lock-mode` is t, but
`font-lock-fontified` is nil, and the color is erased when I call
`font-lock-ensure`.

Oleh



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [elpa] master 2ae5b9c 3/7: swiper.el (swiper-font-lock-ensure): Ignore gnus modes
  2015-03-26 13:52     ` Oleh Krehel
@ 2015-03-26 15:24       ` Tassilo Horn
  2015-03-26 17:59         ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Tassilo Horn @ 2015-03-26 15:24 UTC (permalink / raw
  To: Oleh Krehel; +Cc: Stefan Monnier, emacs-devel

Oleh Krehel <ohwoeowho@gmail.com> writes:

> But what is the cause of discoloration when I call `font-lock-ensure`?
>
> For instance, in `gnus-group-mode`, `font-lock-mode` is t, but
> `font-lock-fontified` is nil, and the color is erased when I call
> `font-lock-ensure`.

I think Gnus propertizes the contents using the 'face property whereas
it should actually use the 'font-lock-face property (or disable
font-lock).

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [elpa] master 2ae5b9c 3/7: swiper.el (swiper-font-lock-ensure): Ignore gnus modes
  2015-03-26 15:24       ` Tassilo Horn
@ 2015-03-26 17:59         ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2015-03-26 17:59 UTC (permalink / raw
  To: Oleh Krehel; +Cc: emacs-devel

> I think Gnus propertizes the contents using the 'face property whereas
> it should actually use the 'font-lock-face property (or disable
> font-lock).

Indeed, but it's far from the only one, so there's no point chasing
all those modes.


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-26 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150326113028.28088.99965@vcs.savannah.gnu.org>
     [not found] ` <E1Yb5za-0007KV-Oa@vcs.savannah.gnu.org>
2015-03-26 13:43   ` [elpa] master 2ae5b9c 3/7: swiper.el (swiper-font-lock-ensure): Ignore gnus modes Stefan Monnier
2015-03-26 13:52     ` Oleh Krehel
2015-03-26 15:24       ` Tassilo Horn
2015-03-26 17:59         ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.