all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Different fontification in temp buffer
@ 2019-01-20  0:48 Daniele Nicolodi
  2019-01-20  2:14 ` Daniele Nicolodi
  2019-01-21  2:51 ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Daniele Nicolodi @ 2019-01-20  0:48 UTC (permalink / raw)
  To: Emacs developers

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



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

end of thread, other threads:[~2019-01-21  2:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-20  0:48 Different fontification in temp buffer Daniele Nicolodi
2019-01-20  2:14 ` Daniele Nicolodi
2019-01-20 13:57   ` Noam Postavsky
2019-01-20 15:55     ` Daniele Nicolodi
2019-01-20 17:56       ` Noam Postavsky
2019-01-20 18:32         ` Daniele Nicolodi
2019-01-21  2:51 ` 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.