[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (font-lock-mode 1) does not always force font-lock

From: Hrvoje Niksic
Subject: Re: (font-lock-mode 1) does not always force font-lock
Date: Fri, 24 Oct 2003 11:49:00 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux)

Alexander Pohoyda <address@hidden> writes:

> Hrvoje Niksic <address@hidden> 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
    (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".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]