summaryrefslogtreecommitdiff
path: root/lisp/toolbar
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-07-17 12:59:14 +0000
committerEli Zaretskii <eliz@gnu.org>2001-07-17 12:59:14 +0000
commit67b2c8dca3c91e1055eaa8b02f379a76838c924b (patch)
tree16614ffb4a468f29349099791510f3b1e752f079 /lisp/toolbar
parent6df7852caffe877cc7a5c1ce503fdefc716360dd (diff)
downloademacs-67b2c8dca3c91e1055eaa8b02f379a76838c924b.tar.gz
(tool-bar-add-item-from-menu, tool-bar-add-item): Don't call image-related
primitives if the display doesn't support images.
Diffstat (limited to 'lisp/toolbar')
-rw-r--r--lisp/toolbar/tool-bar.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/toolbar/tool-bar.el b/lisp/toolbar/tool-bar.el
index afba8aa17f9..86be7b97b96 100644
--- a/lisp/toolbar/tool-bar.el
+++ b/lisp/toolbar/tool-bar.el
@@ -105,7 +105,7 @@ function."
(append (list :type 'xbm :file (concat icon ".xbm"))
colors)
(list :type 'xpm :file (concat icon ".xpm")))))))
- (when image
+ (when (and (display-images-p) image)
(unless (image-mask-p image)
(setq image (append image '(:mask heuristic))))
(define-key-after tool-bar-map (vector key)
@@ -144,7 +144,7 @@ function."
(list :type 'xpm :file (concat icon ".xpm")))))
(image (find-image spec))
submap key)
- (when image
+ (when (and (display-images-p) image)
;; We'll pick up the last valid entry in the list of keys if
;; there's more than one.
(dolist (k keys)