diff lisp/gutter-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 b9167d522a9a
children cc6f0266bc36
line wrap: on
line diff
--- 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."