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 21:12:50 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <8765iephzh.fsf@oak.pohoyda.family> References: <87vfqffbwe.fsf@oak.pohoyda.family> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067023127 10536 80.91.224.253 (24 Oct 2003 19:18:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2003 19:18:47 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Oct 24 21:18:45 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 1AD7SP-0003mU-00 for ; Fri, 24 Oct 2003 21:18:45 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AD7SO-0002tG-00 for ; Fri, 24 Oct 2003 21:18:45 +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 1AD7QV-0000ly-2A for emacs-devel@quimby.gnus.org; Fri, 24 Oct 2003 15:16:47 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AD7NQ-00085B-As for emacs-devel@gnu.org; Fri, 24 Oct 2003 15:13:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AD7Mt-0007hT-2B for emacs-devel@gnu.org; Fri, 24 Oct 2003 15:13:34 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.24) id 1AD7Mr-0007ek-QS for emacs-devel@gnu.org; Fri, 24 Oct 2003 15:13:01 -0400 Original-Received: (qmail 25703 invoked by uid 65534); 24 Oct 2003 19:12:57 -0000 Original-Received: from p508BE78B.dip.t-dialin.net (EHLO oak.pohoyda.family) (80.139.231.139) by mail.gmx.net (mp021) with SMTP; 24 Oct 2003 21:12:57 +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 h9OJCtAM000959; Fri, 24 Oct 2003 21:12:55 +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 h9OJCoxX000952; Fri, 24 Oct 2003 21:12:50 +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: 41 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:17409 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17409 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). > > Then the bug may have been fixed already. Could you please also > check whether the buffer is actually fontified? For example: > > (let ((newbuf (generate-new-buffer "*foo*"))) > (with-current-buffer newbuf > (c-mode) > (insert "\"a string\"") > (font-lock-mode 1)) > (switch-to-buffer newbuf)) > > If things work, using both "*foo*" and with " *foo" should result in > a buffer with fontified "a string". Yes, both cases work. If I comment out (font-lock-mode 1), things still work. -- Alexander Pohoyda PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44