[Bug: 21.5-b28] font-lock-fontify-buffer not working in HTML mode

robert delius royar xemacs at frinabulax.org
Sat Sep 22 16:49:01 EDT 2007


Sat, 22 Sep 2007 (16:19 +0900 UTC) Stephen J. Turnbull wrote:

> robert delius royar writes:
>
> > 1. removing all custom-set-variables from the startup code,
>
> What do you mean "from the startup code"?  `custom-set-variables' is
> an internal function, really, and code that calls it should be written
> only by custom, and all placed in the user's custom.el.  If you are
> calling it from init.el it is very easy to make mistakes.

OK, I now have an init.el with no custom-set-variables and a custom.el 
created by the "Save" button in the customization screen for html 
values.

I still see that I get no coloring in html buffers.  I get it in perl 
and for other font-lock-using modes.  However, if I toggle font-lock off 
then on, I get the coloring.  I should add that these problems just 
began with the CVS of Sept 18.  But the startup code was the same as it 
had been since Sep 3.  I had installed other CVS versions in that 
two-week period without losing font-lock.

The fact that toggling font-lock fixes the problem made me think of a 
similar problem I reported with the new perl-modes (in experimental)--a 
problem later confirmed to be related to regexps.

>
> > leaving them in and removing all custom-set-variables does appear
> > to fix the problem.  I tried reinstalling (and recompiling) the
> > psgml package, but that did not help.
>
> You could try bisecting (removing half the problematic code, if that
> works correctly, then remove the other half; next, remove half of the
> code that seems to contain bogus forms, and so on).
>
> Note that XEmacs face code does not yet support the full format
> supported by GNU Emacs, this could cause problems at initialization.

I do not believe this would be the cause because I have not used GNU 
emacs for a long time, and all the font code I have is (I believe) for 
XEmacs.

Here is a function I use, but I have tested for this problem when no 
function like this is loaded and still see it:
(defun font-vera13 ()
   (interactive)
   (set-face-font 'default "Bitstream Vera Sans Mono-13")
   (set-face-font 'modeline "Bitstream Vera Sans Mono-09")
   (set-face-font 'buffers-tab "Bitstream Vera Sans Mono-09")
   (custom-set-faces
    '(default ((t (:size "13pt" :family "Vera Sans Mono" :background "white"))) t)
    '(italic ((t (:size "13pt" :family "Vera Sans Mono Oblique" :background "white"))) t)
    '(bold-italic ((t (:size "13pt" :family "Vera Sans Mono Bold Oblique" :background "white"))) t)
    '(bold ((t (:size "13pt" :family "Vera Sans Mono Bold" :background "white"))) t)
    '(primary-selection ((t (:background "yellow1"))) t)
    '(text-cursor ((t (:foreground "black" :background "turquoise" :inverse-video nil))) t)
    '(zmacs-region ((t (:background "yellow"))) t)
    '(buffers-tab ((t (:size "9pt" :family "Vera Sans Mono" :bold nil :foreground "blue" :background "gainsboro"))) t)
    '(default-gutter ((t (:background "gainsboro" :foreground "gainsboro"))) t)
    '(top-gutter ((t (:background "gainsboro" :foreground "gainsboro"))) t)
    '(modeline ((t (:size "9pt" :family "Vera Sans Mono" :bold nil :background "lightskyblue"))) t)
    '(html-helper-underline-face ((t (:underline t))))
    '(html-helper-strikethrough-face ((t (:strikethru t))))
    '(html-helper-link-face ((t (:foreground "blue"))))
    '(html-helper-significant-tag-face ((t (:foreground "salmon"))))
    '(flyspell-incorrect-face ((t (:foreground "OrangeRed" :underline t))))
    '(flyspell-duplicate-face ((t (:foreground "Gold3" :underline t)))))
   (set-face-font 'html-helper-italic-face "Bitstream Vera Sans Mono Oblique-13:oblique")
   (set-face-font 'html-helper-bold-face "Bitstream Vera Sans Mono Bold-13:bold")
   (set-face-font 'html-helper-underline-face "Bitstream Vera Sans Mono-13")
   (set-face-font 'html-helper-strikethrough-face "Bitstream Vera Sans Mono-13")
   (set-face-font 'html-helper-link-face "Bitstream Vera Sans Mono-13")
   (set-face-font 'html-helper-significant-tag-face "Bitstream Vera Sans Mono Bold-13:bold")
   (set-face-font 'flyspell-incorrect-face "Bitstream Vera Sans Mono-13")
   (set-face-font 'flyspell-duplicate-face "Bitstream Vera Sans Mono-13")
   (set-frame-size (selected-frame) 130 55)
   (recenter)
   )

-- 
Dr. Robert Delius Royar                   Associate Professor of English
Morehead State University                             Morehead, Kentucky



More information about the XEmacs-Beta mailing list