[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Different fontification in temp buffer
From: |
Daniele Nicolodi |
Subject: |
Re: Different fontification in temp buffer |
Date: |
Sun, 20 Jan 2019 11:32:34 -0700 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 20/01/2019 10:56, Noam Postavsky wrote:
> On Sun, 20 Jan 2019 at 10:55, Daniele Nicolodi <address@hidden> wrote:
>
>>> http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/font-core.el?h=emacs-26.1#n135
>>>
>>> ;; Don't turn on Font Lock mode if we don't have a display (we're running
>>> a
>>> ;; batch job) or if the buffer is invisible (the name starts with a
>>> space).
>>> (when (or noninteractive (eq (aref (buffer-name) 0) ?\s))
>>> (setq font-lock-mode nil))
>>
>> I'm explicitly turning on font-lock mode with (font-lock-ensure). The
>> buffer is indeed fontified, but apparently with a different syntax
>> table. However, I don't fully understand what beancount-mode does with
>> the syntax table, thus I cannot exclude a bug there.
>
> As far as I can tell, font-lock-ensure doesn't actually turn on
> font-lock mode, it just goes ahead and fontifies the buffer anyway.
> Perhaps beancount-mode's fontification functions don't quite work
> properly in that case.
Ah! I didn't know that there is a difference between fontifying a buffer
and enabling font-lock mode. I'll try to understand the differences.
Thanks!
Cheers,
Dan
Re: Different fontification in temp buffer, Stefan Monnier, 2019/01/20