* Re: [elpa] master 3c1f421: rainbow: fix font-lock-mode refresh
[not found] ` <E1YTuhB-0002fg-Id@vcs.savannah.gnu.org>
@ 2015-03-07 0:16 ` Stefan Monnier
2015-03-07 9:38 ` Julien Danjou
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2015-03-07 0:16 UTC (permalink / raw)
To: emacs-devel; +Cc: Julien Danjou
> + ;; Call font-lock-mode to refresh the buffer when used e.g. interactively
> + (font-lock-mode 1)))
I'm not sure I understand why you need that. Do you really mean that
rainbow requires font-lock-mode to be enabled?
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [elpa] master 3c1f421: rainbow: fix font-lock-mode refresh
2015-03-07 0:16 ` [elpa] master 3c1f421: rainbow: fix font-lock-mode refresh Stefan Monnier
@ 2015-03-07 9:38 ` Julien Danjou
2015-03-07 12:48 ` Artur Malabarba
2015-03-09 4:09 ` Stefan Monnier
0 siblings, 2 replies; 5+ messages in thread
From: Julien Danjou @ 2015-03-07 9:38 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
On Fri, Mar 06 2015, Stefan Monnier wrote:
Hi Stefan,
>> + ;; Call font-lock-mode to refresh the buffer when used e.g. interactively
>> + (font-lock-mode 1)))
>
> I'm not sure I understand why you need that. Do you really mean that
> rainbow requires font-lock-mode to be enabled?
To work rainbow-mode needs font-lock-mode, that's for sure.
Without that change, even if font-lock-mode is activated, typing "M-x
rainbow-mode" does not refresh the buffer correctly when it's enabled or
disabled. Adding this line fixes that.
So that's the only way we found to refresh the current fontification of
a buffer with font-lock-mode. If there's a better way, let me know!
Cheers,
--
Julien Danjou
;; Free Software hacker
;; http://julien.danjou.info
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [elpa] master 3c1f421: rainbow: fix font-lock-mode refresh
2015-03-07 9:38 ` Julien Danjou
@ 2015-03-07 12:48 ` Artur Malabarba
2015-03-09 4:10 ` Stefan Monnier
2015-03-09 4:09 ` Stefan Monnier
1 sibling, 1 reply; 5+ messages in thread
From: Artur Malabarba @ 2015-03-07 12:48 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]
> So that's the only way we found to refresh the current fontification of
> a buffer with font-lock-mode. If there's a better way, let me know!
font-lock-fontify-region on older emacs and font-lock-ensure on more recent
versions.
[-- Attachment #2: Type: text/html, Size: 275 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [elpa] master 3c1f421: rainbow: fix font-lock-mode refresh
2015-03-07 9:38 ` Julien Danjou
2015-03-07 12:48 ` Artur Malabarba
@ 2015-03-09 4:09 ` Stefan Monnier
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2015-03-09 4:09 UTC (permalink / raw)
To: emacs-devel
> So that's the only way we found to refresh the current fontification of
> a buffer with font-lock-mode. If there's a better way, let me know!
To cause font-lock to refresh some part of the buffer (typically the
whole buffer, after changing the font-lock-keywords), the (new)
recommended way is to use font-lock-flush.
Note that this is orthogonal to enabling/disabling font-lock-mode (IOW
font-lock-flush won't do anything if font-lock-mode is disabled).
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [elpa] master 3c1f421: rainbow: fix font-lock-mode refresh
2015-03-07 12:48 ` Artur Malabarba
@ 2015-03-09 4:10 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2015-03-09 4:10 UTC (permalink / raw)
To: Artur Malabarba; +Cc: emacs-devel
>> So that's the only way we found to refresh the current fontification of
>> a buffer with font-lock-mode. If there's a better way, let me know!
> font-lock-fontify-region on older emacs and font-lock-ensure on more recent
> versions.
`font-lock-ensure' does not refresh existing fontification.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-09 4:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20150306160149.10234.93321@vcs.savannah.gnu.org>
[not found] ` <E1YTuhB-0002fg-Id@vcs.savannah.gnu.org>
2015-03-07 0:16 ` [elpa] master 3c1f421: rainbow: fix font-lock-mode refresh Stefan Monnier
2015-03-07 9:38 ` Julien Danjou
2015-03-07 12:48 ` Artur Malabarba
2015-03-09 4:10 ` Stefan Monnier
2015-03-09 4:09 ` 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.