emacs-devel
[Top][All Lists]
Advanced

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

defimage


From: Nick Roberts
Subject: defimage
Date: Wed, 10 Jul 2002 23:04:57 +0100

I think defimage is incorrectly defined in image.el. 
Its given as :

(defmacro defimage (symbol specs &optional doc)
  `(defvar ,symbol (find-image ',specs) ,doc))

but I think it should be :

(defmacro defimage (symbol specs &optional doc)
  `(defvar ,symbol (find-image ,specs) ,doc))

Then if I have :

(defconst breakpoint-xpm-data "/* XPM */
static char *magick[] = {
/* columns rows colors chars-per-pixel */
\"12 12 2 1\",
\"  c red\",
\"+ c None\",
/* pixels */
\"+++++  +++++\",
\"+++      +++\",
\"++        ++\",
\"+          +\",
\"+          +\",
\"            \",
\"            \",
\"+          +\",
\"+          +\",
\"++        ++\",
\"+++      +++\",
\"+++++  +++++\"
};"
"XPM file used for breakpoint icon")

I can do :

(defimage breakpoint-disabled-icon 
  `((:type xpm :data ,breakpoint-xpm-data :conversion laplace)))

(defimage breakpoint-enabled-icon 
  `((:type xpm :data ,breakpoint-xpm-data)))

As it stands I can't use a variable for my data as it won't get
evaluated.

With this change, the example in the documentation for defimage
would read :

(defimage test-image '((:type xpm :file \"~/test1.xpm\")
                       (:type xbm :file \"~/test1.xbm\")))

which seems more natural.


Nick



reply via email to

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