changeset 70114:29c303bc6423

(mh-tool-bar-define): Fix enable-expr so that one can permenently disable a button (such as a separator) with nil.
author Bill Wohler <wohler@newt.com>
date Wed, 19 Apr 2006 21:02:59 +0000
parents ac1dd9b38f12
children 3c44c07bc4f0
files lisp/mh-e/ChangeLog lisp/mh-e/mh-tool-bar.el
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mh-e/ChangeLog	Wed Apr 19 09:55:40 2006 +0000
+++ b/lisp/mh-e/ChangeLog	Wed Apr 19 21:02:59 2006 +0000
@@ -1,3 +1,8 @@
+2006-04-19  Bill Wohler  <wohler@newt.com>
+
+	* mh-tool-bar.el (mh-tool-bar-define): Fix enable-expr so that one
+	can permenently disable a button (such as a separator) with nil.
+
 2006-04-18  Bill Wohler  <wohler@newt.com>
 
 	* mh-e.el (defcustom-mh, defface-mh, defgroup-mh, mh-face-data)
--- a/lisp/mh-e/mh-tool-bar.el	Wed Apr 19 09:55:40 2006 +0000
+++ b/lisp/mh-e/mh-tool-bar.el	Wed Apr 19 21:02:59 2006 +0000
@@ -151,7 +151,7 @@
              (doc (if (string-match "\\(.*\\)\n" full-doc)
                       (match-string 1 full-doc)
                     full-doc))
-             (enable-expr (or (nth 4 button) t))
+             (enable-expr (if (eql (length button) 4) t (nth 4 button)))
              (modes (nth 1 button))
              functions show-sym)
         (when (memq 'letter modes) (setq functions `(:letter ,name)))
@@ -318,7 +318,8 @@
         'mh-tool-bar-folder-buttons
         '(list ,@(mapcar (lambda (x) `(quote ,x)) folder-defaults))
         "List of buttons to include in MH-Folder tool bar."
-        :group 'mh-tool-bar :set 'mh-tool-bar-folder-buttons-set
+        :group 'mh-tool-bar
+        :set 'mh-tool-bar-folder-buttons-set
         :type '(set ,@(loop for x in folder-buttons
                             for y in folder-docs
                             collect `(const :tag ,y ,x)))
@@ -328,7 +329,8 @@
         'mh-tool-bar-letter-buttons
         '(list ,@(mapcar (lambda (x) `(quote ,x)) letter-defaults))
         "List of buttons to include in MH-Letter tool bar."
-        :group 'mh-tool-bar :set 'mh-tool-bar-letter-buttons-set
+        :group 'mh-tool-bar
+        :set 'mh-tool-bar-letter-buttons-set
         :type '(set ,@(loop for x in letter-buttons
                             for y in letter-docs
                             collect `(const :tag ,y ,x)))