[email protected]
[Top] [All Lists]

Bug#475649: marked as forwarded (font-lock-global-modes isn't interpret

Subject: Bug#475649: marked as forwarded font-lock-global-modes isn't interpreted correctly
From: Debian Bug Tracking System
Date: Thu, 24 Jul 2008 04:33:07 +0000
Your message dated Wed, 23 Jul 2008 21:23:06 -0700
with message-id <[email protected]>
has caused the   report #475649,
regarding font-lock-global-modes isn't interpreted correctly
to be marked as having been forwarded to the upstream software
author(s) [email protected]

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]

475649: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=475649
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Subject: Re: Bug#475649: font-lock-global-modes isn't interpreted correctly
From: Rob Browning
Date: Wed, 23 Jul 2008 21:23:06 -0700
This was reported as a bug against Emacs 22 in Debian unstable.  If
you don't consider this a bug, just let me know, and I'll close it.

Briefly, the claim is that font-lock-global-modes doesn't work as
documented -- values of t and nil are treated identically.

(If possible, please maintain the CC to 475649-forwarded.)

Ivan Shmakov <[email protected]> writes:

> Package: emacs22
> Version: 22.1+1-3
>       C-h v font-lock-global-modes reads:
> *Modes for which Font Lock mode is automagically turned on.  Global
> Font Lock mode is controlled by the command `global-font-lock-mode'.
> If nil, means no modes have Font Lock mode automatically turned on.
> If t, all modes that support Font Lock mode have it automatically
> turned on.  If a list, it should be a list of `major-mode' symbol
> names for which Font Lock mode should be automatically turned on.
> The sense of the list is negated if it begins with `not'.  For
> example:
>  (c-mode c++-mode)
> means that Font Lock mode is turned on for buffers in C and C++
> modes only.
>       However, when set to any object which is not a list with car
>       equal to 'not, the turn-on-font-lock-if-enabled function
>       behaves as if it was set to t.  I. e., both of the following
>       are interpreted the same:
> (setq font-lock-global-modes t)
> (setq font-lock-global-modes nil)
>       Apparently, the following change fixes the problem:
> --- lisp/font-core.el.~1~     2008-04-12 13:55:21.772259215 +0700
> +++ lisp/font-core.el 2008-04-12 13:54:52.958924668 +0700
> @@ -282,8 +282,10 @@
>    :group 'font-lock)
>  (defun turn-on-font-lock-if-enabled ()
> -  (unless (and (eq (car-safe font-lock-global-modes) 'not)
> -            (memq major-mode (cdr font-lock-global-modes)))
> +  (when (if (eq (car-safe font-lock-global-modes) 'not)
> +         (not (memq major-mode (cdr font-lock-global-modes)))
> +       (or (eq t font-lock-global-modes)
> +           (memq major-mode font-lock-global-modes)))
>      (let (inhibit-quit)
>        (turn-on-font-lock))))

Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

--- End Message ---
<Prev in Thread] Current Thread [Next in Thread>
  • Bug#475649: marked as forwarded (font-lock-global-modes isn't interpreted correctly), Debian Bug Tracking System <=