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

Stephen J. Turnbull stephen at xemacs.org
Sun Sep 23 19:38:57 EDT 2007


robert delius royar writes:

 > If I bypass all the code that uses custom-set-faces, I still have to 
 > toggle the font-lock in HTML-Mode buffers to get syntax highlighting but 
 > not in perl or other non-psgml buffers.

Some modes force fontification.  Maybe the global fontification
variables are set to something strange.  Check the values of

font-lock-auto-fontify
font-lock-mode-enable-list
font-lock-mode-disable-list

 > Are there on-the-fly, programmatic ways to change font values used by 
 > font-lock-enable modes?

set-face-font is the basic one.

 > flag as a possible problem).  But I did not find in the documentation 
 > whether I could control color for fore/background or slant and the 
 > font's heaviness.

Colors are controlled with set-face-foreground and
set-face-background.  Slant is controlled with make-face-italic and
make-face-unitalic, while weight is controlled with make-face-bold and
make-face-unbold.

 > (I am using Xft.

Xft is experimental, and there are no guarantees, except maybe that
you're in for a rough ride.  In particular the code for working with
font menus and changing face properties that require instantiating a
font is totally a kludge.

 > By the way, those values (such as '(html-helper-underline-face ((t 
 > (:underline t)))) ) were initially copied from my ~/.xemacs/custom.el 
 > file which was created through the customize faces menu/page.

They might work for custom, and possibly in the init file, because
they are executed before those faces are instantiated.  However,
without the third element t, they will not take effect until the next
time that face is actually instantiated.



More information about the XEmacs-Beta mailing list