# HG changeset patch # User Eli Zaretskii # Date 995374754 0 # Node ID b8361f15568508381cd86f505a61f0fe41177c33 # Parent 38c0279a4af43ff72c5e0fd498a8dd37fc8a4c94 (tool-bar-add-item-from-menu, tool-bar-add-item): Don't call image-related primitives if the display doesn't support images. diff -r 38c0279a4af4 -r b8361f155685 lisp/toolbar/tool-bar.el --- a/lisp/toolbar/tool-bar.el Tue Jul 17 12:58:19 2001 +0000 +++ b/lisp/toolbar/tool-bar.el Tue Jul 17 12:59:14 2001 +0000 @@ -105,7 +105,7 @@ (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 @@ (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)