help-gnu-emacs
[Top][All Lists]
Advanced

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

intern and faces


From: harven
Subject: intern and faces
Date: Wed, 02 Dec 2009 12:48:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

I have built a small command to colorize a region

(defun put-color (start end color-name)
   (interactive "r\nsColor ? ")
     (let ((my-color (concat "color-" color-name)))
       (unless (facep my-color)
          (set-face-foreground (make-face (intern my-color)) color-name))
       (facemenu-set-face my-color start end)))

But I encounter a problem when trying to spool the result.

Starting with emacs -Q and executing the code above, I switch to another 
buffer, type some text and colorize it with M-x put-color RET brown RET
The result looks fine in the buffer, but when I try to execute
M-x ps-spool-buffer-with-faces, I get the error 

Wrong type argument: listp, "color-brown"

The message was issued by ps-face-attribute-list and the *Postscript* buffer
is empty. I think that the problem comes from my command. If I execute 
(set-face-foreground (make-face 'color-brown) "brown")
instead of my command, everything works.

Where does the error come from ?



reply via email to

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