[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The latest lisp/faces.el changes seem to break color-themes again

From: Lennart Borgman (gmail)
Subject: Re: The latest lisp/faces.el changes seem to break color-themes again
Date: Fri, 17 Oct 2008 01:09:00 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Lennart Borgman (gmail) wrote:
> Chong Yidong wrote:
>> Could someone try to debug what color-theme does that now breaks?
> I do not know about color-theme, but I just noticed that the
> htmlfontify.el I distribute with nXhtml is broken too and I guess it is
> the same problem. htmlfontify.el should be included in Emacs, but that
> seems to have stalled somewhere.
> I get an error when I try to use htmlfontify-buffer on
> list-colors-display output. I think the problem is that the format of
> the data that hfy-get-face-at recieves, but I do not remember how it
> looked before. Here is how the function look right now:
> (defun hfy-get-face-at (pos)
>   (if (or (not show-trailing-whitespace)
>           (not (get-text-property pos 'hfy-show-trailing-whitespace)))
>       (get-text-property pos 'face)
>     (list 'trailing-whitespace (get-text-property pos 'face))))
> In the buffer I mentioned above get-text-property will now return things
> like
>   (:background "snow")
> There was some discussions before about removing old style face data,
> but I do not remember that either, maybe Richard does.

Here some more information that might help:

In hfy-fact-at in htmlfontify.el the code used to do

  (let ((overlay-data nil)
        (face-name    (hfy-get-face-at p))
        (prop-seen    nil)
        (found-face   nil)
        (extra-props  nil)
        (text-props   (text-properties-at p))
        ;;(face-names   nil)
    (when (listp face-name)
      (dolist (f face-name)
        (if (listp f) ;; for things like (variable-pitch (:foreground
            (setq extra-props (cons f extra-props))
          (setq extra-props (cons :inherit (cons f extra-props)))))
      (setq face-name nil))

Changing the if clause to (if t ...) now makes htmlfontify-buffer work
for list-colors-display, but it may break something else.

I remember I struggled a lot with this part of the code when I tried to
get htmlfontify to work for all kinds of face specs in the buffer. Is
there any documentation now that tells how face specs can look?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]