From: Eli Zaretskii Date: Tue, 17 Jul 2001 12:59:14 +0000 (+0000) Subject: (tool-bar-add-item-from-menu, tool-bar-add-item): Don't call image-related X-Git-Tag: emacs-pretest-21.0.105~459 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=196de866ae213a565c0bb7079aac1fad827e2415;p=emacs.git (tool-bar-add-item-from-menu, tool-bar-add-item): Don't call image-related primitives if the display doesn't support images. --- 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)