GNU bug report logs - #635
Adding font-lock keywords results in no font-lock at all

Previous Next

Package: emacs;

Reported by: Klaus Zeitler <kzeitler <at> alcatel-lucent.com>

Date: Fri, 1 Aug 2008 06:35:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Klaus Zeitler <kzeitler <at> alcatel-lucent.com>
Subject: bug#635: closed (Re: bug#635: Adding font-lock keywords results
 in no font-lock at all)
Date: Sat, 09 Oct 2010 04:09:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#635: Adding font-lock keywords results in no font-lock at all

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 635 <at> debbugs.gnu.org.

-- 
635: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=635
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: 635-done <at> debbugs.gnu.org
Subject: Re: bug#635: Adding font-lock keywords results in no font-lock at all
Date: Sat, 09 Oct 2010 00:11:29 -0400
I've just checked in a patch by David Koppelman which should fix this:

http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00239.html

[Message part 3 (message/rfc822, inline)]
From: Klaus Zeitler <kzeitler <at> alcatel-lucent.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Klaus Zeitler <kzeitler <at> alcatel-lucent.com>
Subject: Adding font-lock keywords results in no font-lock at all
Date: Fri, 1 Aug 2008 08:21:30 +0200 (MEST)
For many years I had the following statement in my .emacs file:

(defun show-tabs () "Show tabs with a slightly changed background"
  (font-lock-add-keywords nil '(("\t"  (0 'tab-face t))) t))
(add-hook 'font-lock-mode-hook 'show-tabs)

This has worked without any problems up to 22.1.
In version 22.2 and 23 I do have problems with syntax highlighting due
to these few lines above in some modes, e.g. when I try M-x list-faces-display
all colors are gone.

To reproduce:

1. start "emacs -Q"
2. in scratch buffer evaluate
(defun show-tabs () "Show tabs with a slightly changed background"
  (font-lock-add-keywords nil '(("\t"  (0 'font-lock-constant-face t))) t))
(add-hook 'font-lock-mode-hook 'show-tabs)
3. M-x list-faces-display
=> everything's displayed in default face



In GNU Emacs 22.2.2 (sparc-sun-solaris2.8, Motif Version 2.1.0)
 of 2008-04-09 on sfsws4
Windowing system distributor `Sun Microsystems, Inc.', version 11.0.6410
configured using `configure  '--with-gcc' '--prefix=/vol/freeware/SunOS-5.8/emacs/22.2' '--sharedstatedir=/vol/freeware/SunOS-5.8/emacs/22.2/share' '--with-x-toolkit=motif' '--x-includes=/usr/openwin/include:/usr/local/gnu/include:/opt/exp/gnu/include:/opt/exp/include:/opt/exp/lib/xpm/include' '--x-libraries=/usr/openwin/lib:/usr/local/gnu/lib:/opt/exp/gnu/lib:/opt/exp/lib:/opt/exp/lib/xpm/lib' '--with-pop' 'CC=gcc' 'XMKMF=/usr/openwin/bin/xmkmf''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<help-echo> <help-echo> <menu-bar> <help-menu> <se
nd-emacs-bug-report>

Recent messages:
("emacs" "-Q")
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done





This bug report was last modified 14 years and 226 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.