From: Bill Wohler Date: Wed, 19 Apr 2006 21:02:59 +0000 (+0000) Subject: (mh-tool-bar-define): Fix enable-expr so that one can permenently X-Git-Tag: emacs-pretest-22.0.90~3053 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d36069f0e74edd9c8237db016e823da21ce332a8;p=emacs.git (mh-tool-bar-define): Fix enable-expr so that one can permenently disable a button (such as a separator) with nil. --- diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 72c7a87f257..545b799b560 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,8 @@ +2006-04-19 Bill Wohler + + * 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 * mh-e.el (defcustom-mh, defface-mh, defgroup-mh, mh-face-data) diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el index fccf83cf8d6..3cd043d4a7e 100644 --- a/lisp/mh-e/mh-tool-bar.el +++ b/lisp/mh-e/mh-tool-bar.el @@ -151,7 +151,7 @@ where, (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 @@ where, '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 @@ where, '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)))