From xemacs-m  Tue Jul 22 10:27:32 1997
Received: from ns1.eds.com (ns1.eds.com [192.85.154.78])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id KAA03275
	for <xemacs-beta@xemacs.org>; Tue, 22 Jul 1997 10:27:31 -0500 (CDT)
Received: from nnsa.eds.com (nnsa.eds.com [130.174.31.78])
	by ns1.eds.com (8.8.6/8.8.5) with ESMTP id LAA17147
	for <xemacs-beta@xemacs.org>; Tue, 22 Jul 1997 11:27:33 -0400 (EDT)
Received: from kocrsv04.delcoelect.com (kocrsv04.delcoelect.com [144.250.100.205])
	by nnsa.eds.com (8.8.5/8.8.5) with ESMTP id LAA26371
	for <xemacs-beta@xemacs.org>; Tue, 22 Jul 1997 11:27:03 -0400 (EDT)
Received: from kocrsw12.delcoelect.com (kocrsw12.delcoelect.com [144.250.106.18]) by kocrsv04.delcoelect.com (8.7.5/8.7.3) with SMTP id KAA20271 for <xemacs-beta@xemacs.org>; Tue, 22 Jul 1997 10:27:02 -0500 (EST)
Received: from kocrsw12 by kocrsw12.delcoelect.com (SMI-8.6/SMI-SVR4)
	id KAA22422; Tue, 22 Jul 1997 10:27:01 -0500
X-Mailer: exmh version 2.0gamma 1/27/97
To: xemacs-beta@xemacs.org
Subject: [PATCH] Improvement for whitespace-mode toolbar code
X-Attribution: mts
X-Face: 4tk3bJx]I+QTZ|=]*1+Z){9+;5u_hK*NBeZK6[+B+iB%bVuOJ%^uK~fIG}O-}%WLX*D^aW>
 Gv8E3Xtz0\N&fQl^:pj<K{xM`:d>pPt:9lF-YXB%O)?@rd?*/jE!s94`?]:jJ#C5RDP:;Mr.3lwo`0
 {vIT+<{%IRwe]vLd]7>\X|*z{TUX_t;?TPcOLBMIv8_V92!Vk(*DJVU~0M[`5D^PAWLniO1?YYWArM
 U*j9o+>?1MWi.lO?F-?aVt:qQ8OaG?R}B:I!7S_+KuzxZ.f9M@$z#n\bG2$Q2{od
Date: Tue, 22 Jul 1997 10:27:00 -0500
Message-ID: <22420.869585220@kocrsw12>
From: Mike Scheidler <c23mts@eng.delcoelect.com>

Now that we have finer control over what appears in the toolbar (thanks to
Jeff Miller's toolbar-utils.el), here is a fix to add the whitespace-mode
button to the end of the toolbar instead of redefining the whole thing.

1997-07-22  Mike Scheidler <c23mts@eng.delcoelect.com>

	* modes/whitespace-mode.el:  Improved mechanism for adding
	  whitespace-mode button to toolbar.


--- lisp/modes/whitespace-mode.el~	Sat Apr 19 18:21:05 1997
+++ lisp/modes/whitespace-mode.el	Tue Jul 22 09:49:20 1997
@@ -563,29 +563,9 @@
 	 whitespace-install-toolbar-icon
 	 (featurep 'toolbar) 
 	 (eq (device-type (selected-device)) 'x))
-    (add-spec-list-to-specifier 
-     default-toolbar
-     '((global 
-	(nil
-	 [toolbar-file-icon     find-file       t       "Open a file"   ]
-	 [toolbar-folder-icon   dired           t       "View directory"]
-	 [toolbar-disk-icon     save-buffer     t       "Save buffer"   ]
-	 [toolbar-printer-icon  print-buffer    t       "Print buffer"  ]
-	 [toolbar-cut-icon      x-kill-primary-selection   t "Kill region"]
-	 [toolbar-copy-icon     x-copy-primary-selection   t "Copy region"]
-	 [toolbar-paste-icon    
-	  x-yank-clipboard-selection t "Paste from clipboard"]
-	 [toolbar-undo-icon     undo            t       "Undo edit"     ]
-	 [toolbar-replace-icon  query-replace   t       "Replace text"  ]
-	 [toolbar-wspace-icon  
-	  whitespace-toolbar-function t "Toggle whitespace mode"]
-	 nil
-	 [toolbar-compile-icon  toolbar-compile t       "Compile"       ]
-	 [toolbar-debug-icon    toolbar-debug   t       "Debug"         ]
-	 [toolbar-spell-icon    toolbar-ispell  t       "Spellcheck"    ]
-	 [toolbar-mail-icon     toolbar-mail    t       "Mail"          ]
-	 [toolbar-news-icon     toolbar-news    t       "News"          ]
-	 [toolbar-info-icon     toolbar-info    t       "Information"   ]
-	 )))))
+    (toolbar-add-item
+     [toolbar-wspace-icon whitespace-toolbar-function t
+                          "Toggle whitespace mode"]
+     (length (specifier-instance default-toolbar))))
 
 ;;; whitespace-mode.el ends here


--
Mike Scheidler                     INTERNET:  c23mts@eng.delcoelect.com
Software Development Tools         UUCP:      deaes!c23mts
Delco Electronics Corporation      PHONE:     (765) 451-0319
Kokomo, IN 46904-9005              GMNET:     8-322-0319


