+2001-12-28 Miles Bader <miles@gnu.org>
+
+ * wid-edit.el (widget-toggle-value-create): Don't eval actual
+ images (which are lists too).
+
2001-12-27 Eli Zaretskii <eliz@is.elta.co.il>
* language/european.el: Fix the doc string of "Latin-5" language
(defun widget-toggle-value-create (widget)
"Insert text representing the `on' and `off' states."
(if (widget-value widget)
- (progn
+ (let ((image (widget-get widget :on-glyph)))
(and (display-graphic-p)
- (listp (widget-get widget :on-glyph))
- (widget-put widget :on-glyph
- (eval (widget-get widget :on-glyph))))
+ (listp image)
+ (not (eq (car image) 'image))
+ (widget-put widget :on-glyph (setq image (eval image))))
(widget-image-insert widget
(widget-get widget :on)
- (widget-get widget :on-glyph)))
- (and (display-graphic-p)
- (listp (widget-get widget :off-glyph))
- (widget-put widget :off-glyph
- (eval (widget-get widget :off-glyph))))
- (widget-image-insert widget
- (widget-get widget :off)
- (widget-get widget :off-glyph))))
+ image))
+ (let ((image (widget-get widget :off-glyph)))
+ (and (display-graphic-p)
+ (listp image)
+ (not (eq (car image) 'image))
+ (widget-put widget :off-glyph (setq image (eval image))))
+ (widget-image-insert widget (widget-get widget :off) image))))
(defun widget-toggle-action (widget &optional event)
;; Toggle value.