[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Different fontification in temp buffer
From: |
Daniele Nicolodi |
Subject: |
Different fontification in temp buffer |
Date: |
Sat, 19 Jan 2019 17:48:51 -0700 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hello,
I'm hacking on a minor mode and I'm writing unit tests for the
fontification feature. I am encountering a strange issue: the
fontification is different if execute in a temp buffer or in a regular
buffer. In particular:
(with-temp-buffer
(insert string)
(fundamental-mode)
(beancount-mode)
(font-lock-ensure)
(buffer-string))
and
(with-current-buffer (generate-new-buffer "*test*")
(insert string)
(fundamental-mode)
(beancount-mode)
(font-lock-ensure)
(buffer-string))
strangely result in two different results. Why is it so?
Thank you.
Cheers,
Dan
- Different fontification in temp buffer,
Daniele Nicolodi <=
Re: Different fontification in temp buffer, Stefan Monnier, 2019/01/20