unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* intern and faces
@ 2009-12-02 11:48 harven
  2009-12-02 16:51 ` Drew Adams
       [not found] ` <mailman.12034.1259772781.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: harven @ 2009-12-02 11:48 UTC (permalink / raw)
  To: help-gnu-emacs

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 ?



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-02 20:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02 11:48 intern and faces harven
2009-12-02 16:51 ` Drew Adams
     [not found] ` <mailman.12034.1259772781.2239.help-gnu-emacs@gnu.org>
2009-12-02 20:22   ` harven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).