From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alexander Pohoyda Newsgroups: gmane.emacs.devel Subject: Re: (font-lock-mode 1) does not always force font-lock Date: 24 Oct 2003 07:22:09 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87vfqffbwe.fsf@oak.pohoyda.family> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066973409 1926 80.91.224.253 (24 Oct 2003 05:30:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2003 05:30:09 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Oct 24 07:30:07 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACuWV-0006Dp-00 for ; Fri, 24 Oct 2003 07:30:07 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACuWU-0005ZE-00 for ; Fri, 24 Oct 2003 07:30:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACuWJ-0002zR-GG for emacs-devel@quimby.gnus.org; Fri, 24 Oct 2003 01:29:55 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ACuW3-0002xS-Bg for emacs-devel@gnu.org; Fri, 24 Oct 2003 01:29:39 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ACuVX-0002QE-Eu for emacs-devel@gnu.org; Fri, 24 Oct 2003 01:29:38 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.24) id 1ACuVW-0002PB-SS for emacs-devel@gnu.org; Fri, 24 Oct 2003 01:29:07 -0400 Original-Received: (qmail 31044 invoked by uid 65534); 24 Oct 2003 05:22:20 -0000 Original-Received: from p508BEF46.dip.t-dialin.net (EHLO oak.pohoyda.family) (80.139.239.70) by mail.gmx.net (mp009) with SMTP; 24 Oct 2003 07:22:20 +0200 X-Authenticated: #14602519 Original-Received: from oak.pohoyda.family (oak.pohoyda.family [127.0.0.1]) by oak.pohoyda.family (8.12.9/8.12.9) with ESMTP id h9O5MBJD000376; Fri, 24 Oct 2003 07:22:12 +0200 (CEST) (envelope-from alexander.pohoyda@gmx.net) Original-Received: (from apog@localhost) by oak.pohoyda.family (8.12.9/8.12.9/Submit) id h9O5MAcA000373; Fri, 24 Oct 2003 07:22:10 +0200 (CEST) (envelope-from alexander.pohoyda@gmx.net) X-Authentication-Warning: oak.pohoyda.family: apog set sender to alexander.pohoyda@gmx.net using -f Original-To: Hrvoje Niksic In-Reply-To: Original-Lines: 25 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17395 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17395 Hrvoje Niksic writes: > > what code tests this? > > I don't have the sources handy. It seems that the code recognizes > the buffer as temporary by checking for names that begins with > space. For instance, this works (returns t): > > (let ((newbuf (generate-new-buffer "*foo*"))) > (with-current-buffer newbuf > (c-mode) > (font-lock-mode 1) > (prog1 font-lock-mode > (kill-buffer (current-buffer))))) > > Change "*foo*" to " *foo*", and it no longer works, i.e. it returns > nil. I have just tested it on recent Emacs and this code always works (returns t). -- Alexander Pohoyda PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44