From: Noam Postavsky <npostavs@gmail.com>
To: Daniele Nicolodi <daniele@grinta.net>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Different fontification in temp buffer
Date: Sun, 20 Jan 2019 08:57:23 -0500 [thread overview]
Message-ID: <CAM-tV-8a+PtfOVuv0zpxR9xGBHb+76xFftrHu59MHxijBsGecA@mail.gmail.com> (raw)
In-Reply-To: <240a311e-ec17-8c91-74c1-d30fd4da2809@grinta.net>
On Sat, 19 Jan 2019 at 21:14, Daniele Nicolodi <daniele@grinta.net> wrote:
>
> On 19/01/2019 17:48, Daniele Nicolodi wrote:
> > 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.
> Investigating further, the difference between the two cases is that
> with-temp-buffer creates a buffer that does not keep undo information.
It's not about undo info, but rather that font-lock mode doesn't turn
on in temp buffers.
See in the definition of font-lock-mode:
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))
next prev parent reply other threads:[~2019-01-20 13:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM-tV-8a+PtfOVuv0zpxR9xGBHb+76xFftrHu59MHxijBsGecA@mail.gmail.com \
--to=npostavs@gmail.com \
--cc=daniele@grinta.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.