Mercurial > hg > xemacs-beta
changeset 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 | 3cc7470ea71c |
children | 05c1ad4f7a7b |
files | lisp/ChangeLog lisp/gutter-items.el lisp/toolbar-items.el |
diffstat | 3 files changed, 42 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Jun 03 18:40:57 2011 +0100 +++ b/lisp/ChangeLog Sat Jun 04 14:17:59 2011 +0100 @@ -1,3 +1,11 @@ +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.) + 2011-05-29 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el (cl-transform-lambda):
--- a/lisp/gutter-items.el Fri Jun 03 18:40:57 2011 +0100 +++ b/lisp/gutter-items.el Sat Jun 04 14:17:59 2011 +0100 @@ -314,28 +314,26 @@ (remove-gutter-element left-gutter 'buffers-tab) (remove-gutter-element right-gutter 'buffers-tab) ;; Put tabs into all devices that will be able to display them - (mapcar - #'(lambda (x) - (when (valid-image-instantiator-format-p 'tab-control x) - (cond ((eq gutter-buffers-tab-orientation 'top) - ;; This looks better than a 3d border - (set-specifier top-gutter-border-width 0 'global x) - (set-gutter-element top-gutter 'buffers-tab - gutter-string 'global x)) - ((eq gutter-buffers-tab-orientation 'bottom) - (set-specifier bottom-gutter-border-width 0 'global x) - (set-gutter-element bottom-gutter 'buffers-tab - gutter-string 'global x)) - ((eq gutter-buffers-tab-orientation 'left) - (set-specifier left-gutter-border-width 0 'global x) - (set-gutter-element left-gutter 'buffers-tab - gutter-string 'global x)) - ((eq gutter-buffers-tab-orientation 'right) - (set-specifier right-gutter-border-width 0 'global x) - (set-gutter-element right-gutter 'buffers-tab - gutter-string 'global x)) - ))) - (console-type-list)))) + (dolist (x (console-type-list)) + (when (valid-image-instantiator-format-p 'tab-control x) + (case gutter-buffers-tab-orientation + (top + ;; This looks better than a 3d border + (set-specifier top-gutter-border-width 0 'global x) + (set-gutter-element top-gutter 'buffers-tab + gutter-string 'global x)) + (bottom + (set-specifier bottom-gutter-border-width 0 'global x) + (set-gutter-element bottom-gutter 'buffers-tab + gutter-string 'global x)) + (left + (set-specifier left-gutter-border-width 0 'global x) + (set-gutter-element left-gutter 'buffers-tab + gutter-string 'global x)) + (right + (set-specifier right-gutter-border-width 0 'global x) + (set-gutter-element right-gutter 'buffers-tab gutter-string 'global + x))))))) (defun update-tab-in-gutter (frame &optional force-selection) "Update the tab control in the gutter area."
--- a/lisp/toolbar-items.el Fri Jun 03 18:40:57 2011 +0100 +++ b/lisp/toolbar-items.el Sat Jun 04 14:17:59 2011 +0100 @@ -454,26 +454,20 @@ (defun toolbar-add-item-data (icon-list &optional icon-dir) (if (eq icon-dir nil) (setq icon-dir toolbar-icon-directory)) - (mapcar - (lambda (cons) - (let ((prefix (expand-file-name (cdr cons) icon-dir))) - ;; #### This should use a better mechanism for finding the - ;; glyphs, allowing for formats other than x[pb]m. Look at - ;; `widget-glyph-find' for an example how it might be done. - (set (car cons) - (if (featurep 'xpm) - (toolbar-make-button-list - (concat prefix "-up.xpm") - nil - (concat prefix "-xx.xpm") - (concat prefix "-cap-up.xpm") - nil - (concat prefix "-cap-xx.xpm")) - (toolbar-make-button-list - (concat prefix "-up.xbm") - (concat prefix "-dn.xbm") - (concat prefix "-xx.xbm")))))) - icon-list)) + (dolist (cons icon-list) + (let ((prefix (expand-file-name (cdr cons) icon-dir))) + ;; #### This should use a better mechanism for finding the + ;; glyphs, allowing for formats other than x[pb]m. Look at + ;; `widget-glyph-find' for an example how it might be done. + (set (car cons) + (if (load-time-value (featurep 'xpm)) + (toolbar-make-button-list (concat prefix "-up.xpm") nil + (concat prefix "-xx.xpm") + (concat prefix "-cap-up.xpm") + nil (concat prefix "-cap-xx.xpm")) + (toolbar-make-button-list (concat prefix "-up.xbm") + (concat prefix "-dn.xbm") + (concat prefix "-xx.xbm"))))))) (defvar toolbar-vector-open [toolbar-file-icon toolbar-open t "Open a file"]