From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: Different fontification in temp buffer Date: Sun, 20 Jan 2019 08:57:23 -0500 Message-ID: References: <36cc3b65-2459-bf32-37f1-2bd538fafe07@grinta.net> <240a311e-ec17-8c91-74c1-d30fd4da2809@grinta.net> NNTP-Posting-Host: ciao.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: ciao.gmane.org 1547992658 36316 195.159.176.228 (20 Jan 2019 13:57:38 GMT) X-Complaints-To: usenet@ciao.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2019 13:57:38 +0000 (UTC) Cc: Emacs developers To: Daniele Nicolodi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 20 14:57:36 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1glDbT-0009Qv-Gu for ged-emacs-devel@m.gmane.org; Sun, 20 Jan 2019 14:57:35 +0100 Original-Received: from localhost ([127.0.0.1]:40194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glDbc-0002qE-71 for ged-emacs-devel@m.gmane.org; Sun, 20 Jan 2019 08:57:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glDbW-0002q6-HH for emacs-devel@gnu.org; Sun, 20 Jan 2019 08:57:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glDbV-0004nR-6b for emacs-devel@gnu.org; Sun, 20 Jan 2019 08:57:38 -0500 Original-Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]:33025) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1glDbV-0004lU-1n for emacs-devel@gnu.org; Sun, 20 Jan 2019 08:57:37 -0500 Original-Received: by mail-ot1-x335.google.com with SMTP id i20so18459173otl.0 for ; Sun, 20 Jan 2019 05:57:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fhg8PzosMctUd6WlJ8+mHKP/ABZoOVTZPVG9XChWQ7U=; b=jJhiONQHRN6z5CFoaaZTaoQaj83we2ojSuCIFEvjyt+OwwJ6HsGqzCDSnThw1n0zqB a6s0htzla8Pnwtgl80EGX1Vg+P88SkAHNtAB7Il4ZVf2sCwPylRbEWwLTEmIgyf2rUTo Eyq+TAbRrUi6lomBIDsboIx3cMGVAYD6/HgX4EqZCS4/1pf7RG0SSSKwGEfChSfqUaaP vgaVAku/bgFzhIo4oILs3p1QkPJVqX7MsZKBl3kYy/nwsXPIAP6+UA85N+fxJ8hF5zaP yvZ6lujOLUNmdfLXoM8/rQvleJJaPwtjQK1FKCOFmaIOQXPridbV+QeM3fWud6NZPam+ XzgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fhg8PzosMctUd6WlJ8+mHKP/ABZoOVTZPVG9XChWQ7U=; b=hnmQhIht7++e/Ca0zuptlWjZFJn5F8zM93UPQlEeMv3ONA+dEwEfvQYEnIRCfMG/tg KCHt/y+g66YOgE0zAGaJxV458xQQTfYBSIHwQNIaplTpmfe0vaFENMz6fpstTYNtHfLi cEvnzCQ7c7UV8AmaBESGbX519r5kejOJMUyZ41sUUxJoR2nSdWUl8UgfyrGuSkClS+ze BadF5JRv3w10RoPx4Cf1HkWvkHqo1vCQo7fFz1J8KSC/rMoySmHHkdfLP+zs1eEENQqQ FeyrXlhQIzlbdq7xCHphZ4OR3mjwTgC7meNmbX/ClqHqRoQl0XG/WP5v3OC6iEzPmxAP F4qw== X-Gm-Message-State: AJcUukecOQ0/2Xs+AI8yGc4rdBSCvwowlQ2d+Vg4PFu9xs5oqPQVNlxS 8J1wtx7xjXMubjMd2v2jYhe2gOwcvHjRrIs5yV0BllrS X-Google-Smtp-Source: ALg8bN6pyjHCZraNVlIRM3Rj358IHIW7Db4AXbkxFG7poHouwUZ4oEsyzofwxwctjRf/n4W/4UT52iRC3JcJ7DWIzDM= X-Received: by 2002:a05:6830:1005:: with SMTP id a5mr16016468otp.113.1547992654634; Sun, 20 Jan 2019 05:57:34 -0800 (PST) In-Reply-To: <240a311e-ec17-8c91-74c1-d30fd4da2809@grinta.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::335 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232537 Archived-At: On Sat, 19 Jan 2019 at 21:14, Daniele Nicolodi 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))