emacs-devel
[Top][All Lists]
Advanced

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

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


From: Alexander Pohoyda
Subject: Re: (font-lock-mode 1) does not always force font-lock
Date: 24 Oct 2003 21:12:50 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

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
>     (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 <address@hidden>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72  15 54 5F 62 20 23 C6 44




reply via email to

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