From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: font-lock-add-keywords: should font-lock-mode be turned off/on after that Date: Fri, 29 May 2009 19:56:16 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1243619795 11858 80.91.229.12 (29 May 2009 17:56:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2009 17:56:35 +0000 (UTC) Cc: =?UTF-8?B?Wm9sdMOhbiBOYWd5?= To: Emacs-Devel devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 29 19:56:33 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MA6Jg-00066c-VG for ged-emacs-devel@m.gmane.org; Fri, 29 May 2009 19:56:29 +0200 Original-Received: from localhost ([127.0.0.1]:43037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MA6Jg-0007Qt-3v for ged-emacs-devel@m.gmane.org; Fri, 29 May 2009 13:56:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MA6Jb-0007Qd-SC for emacs-devel@gnu.org; Fri, 29 May 2009 13:56:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MA6JX-0007Pe-9y for emacs-devel@gnu.org; Fri, 29 May 2009 13:56:23 -0400 Original-Received: from [199.232.76.173] (port=51790 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MA6JX-0007PX-2F for emacs-devel@gnu.org; Fri, 29 May 2009 13:56:19 -0400 Original-Received: from mail-fx0-f169.google.com ([209.85.220.169]:39926) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MA6JW-0005uy-EY for emacs-devel@gnu.org; Fri, 29 May 2009 13:56:18 -0400 Original-Received: by fxm17 with SMTP id 17so6946109fxm.42 for ; Fri, 29 May 2009 10:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=9vq1WZFbYEbeJk29VXH1I+1RG+xL4RBwGAOX9dLEbrQ=; b=qn2+rDqCR4E7ubFvigLulHihT7ZRQfeYCEYDU+Ru2sA1R5guDYZc7Bpn2MvzwF2zoq /EV7MucbaGKmDGvSW9VUKd9NehKg1soULwTxXsFwGM9UC8h0OIBbF5Ol3ilNIbQSOm7I EJINEASY7j7NzJc2e+0Bo117/iH1LCWBK0x7Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=kiC4hWSy77dkeq1BzSv3qwt/WI3orGgh7kCR2qpgDXbYLX3tfc0UXsaJ5kzJADvp+y baP3MHXRMK0KAiUeuuXj1vboSkxYBEfkMSjW+KtUOYD3VRpMAnkl0yKcLV2pDaRVhRLM uC19ZoJQj7tp9nptacOFN61t960aS7FpftpSM= Original-Received: by 10.239.152.143 with SMTP id v15mr212902hbb.26.1243619776869; Fri, 29 May 2009 10:56:16 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:111204 Archived-At: After sending this I got an idea that there might be a bug in font-lock-add-keywords when mode is nil. It seems to be so. Setting (font-lock-add-keywords 'php-mode doxymacs-doxygen-keywords) make it works and then it works in mumamo too. On Fri, May 29, 2009 at 7:50 PM, Lennart Borgman wrote: > If you add keywords > > =C2=A0 =C2=A0 =C2=A0 =C2=A0(font-lock-add-keywords nil doxymacs-doxygen-k= eywords) > > Do you have to do > > =C2=A0 =C2=A0 =C2=A0 =C2=A0(font-lock-mode -1) > =C2=A0 =C2=A0 =C2=A0 =C2=A0(font-lock-mode 1) > > after that? It looks to me from the code like it is not necessary, but > I in the case above font-lock did not work without turning off/on > font-lock. Actually after > > (defun my-doxymacs-font-lock () > =C2=A0(require 'doxymacs) > =C2=A0(message "before (doxymacs-font-lock)") > =C2=A0(doxymacs-font-lock) > =C2=A0(message "after (doxymacs-font-lock)")) > (add-hook 'php-mode-hook 'my-doxymacs-font-lock) > > and doing > > =C2=A0 M-x php-mode > > there was no fontification at all until font-lock was turned off/on > and then the keywords worked too. > > It looks to me that there can be some kind of problem with > doxymacs-doxygen-keywords. Is there some way of checking that? Or is > it something with font-lock-add-keywords? >