mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-01 11:14:55 +00:00
(tool-bar-add-item-from-menu, tool-bar-add-item): Don't call image-related
primitives if the display doesn't support images.
This commit is contained in:
parent
ddc456e4ec
commit
196de866ae
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user