comparison lisp/toolbar-items.el @ 5519:bcd74c477a38

Switch to #'dolist instead of #'mapcar in a couple of places if result not used 2011-06-04 Aidan Kehoe <kehoea@parhasard.net> * gutter-items.el (add-tab-to-gutter): * toolbar-items.el (toolbar-add-item-data): Switch to #'dolist instead of #'mapcar in a couple of places where the result isn't used. (Committed now mostly to trigger a commit mail so Mats' buildbot gets woken up.)
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 04 Jun 2011 14:17:59 +0100
parents 4dee0387b9de
children
comparison
equal deleted inserted replaced
5518:3cc7470ea71c 5519:bcd74c477a38
452 (set-specifier default-toolbar initial-toolbar-spec)) 452 (set-specifier default-toolbar initial-toolbar-spec))
453 453
454 (defun toolbar-add-item-data (icon-list &optional icon-dir) 454 (defun toolbar-add-item-data (icon-list &optional icon-dir)
455 (if (eq icon-dir nil) 455 (if (eq icon-dir nil)
456 (setq icon-dir toolbar-icon-directory)) 456 (setq icon-dir toolbar-icon-directory))
457 (mapcar 457 (dolist (cons icon-list)
458 (lambda (cons) 458 (let ((prefix (expand-file-name (cdr cons) icon-dir)))
459 (let ((prefix (expand-file-name (cdr cons) icon-dir))) 459 ;; #### This should use a better mechanism for finding the
460 ;; #### This should use a better mechanism for finding the 460 ;; glyphs, allowing for formats other than x[pb]m. Look at
461 ;; glyphs, allowing for formats other than x[pb]m. Look at 461 ;; `widget-glyph-find' for an example how it might be done.
462 ;; `widget-glyph-find' for an example how it might be done. 462 (set (car cons)
463 (set (car cons) 463 (if (load-time-value (featurep 'xpm))
464 (if (featurep 'xpm) 464 (toolbar-make-button-list (concat prefix "-up.xpm") nil
465 (toolbar-make-button-list 465 (concat prefix "-xx.xpm")
466 (concat prefix "-up.xpm") 466 (concat prefix "-cap-up.xpm")
467 nil 467 nil (concat prefix "-cap-xx.xpm"))
468 (concat prefix "-xx.xpm") 468 (toolbar-make-button-list (concat prefix "-up.xbm")
469 (concat prefix "-cap-up.xpm") 469 (concat prefix "-dn.xbm")
470 nil 470 (concat prefix "-xx.xbm")))))))
471 (concat prefix "-cap-xx.xpm"))
472 (toolbar-make-button-list
473 (concat prefix "-up.xbm")
474 (concat prefix "-dn.xbm")
475 (concat prefix "-xx.xbm"))))))
476 icon-list))
477 471
478 (defvar toolbar-vector-open 472 (defvar toolbar-vector-open
479 [toolbar-file-icon toolbar-open t "Open a file"] 473 [toolbar-file-icon toolbar-open t "Open a file"]
480 "Define the vector for the \"Open\" toolbar button") 474 "Define the vector for the \"Open\" toolbar button")
481 475