From: yamaoka Date: Tue, 19 Jul 2011 11:05:52 +0000 (+0000) Subject: wl-e21.el (wl-e21-make-toolbar-buttons): Work around the Emacs 24 error: X-Git-Tag: merged-trunk-to-elmo-imap4-compliance-3^2~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=255041087c1dab2d275ab4e1869d7df19cce007d;p=elisp%2Fwanderlust.git wl-e21.el (wl-e21-make-toolbar-buttons): Work around the Emacs 24 error: "`keymap' is reserved for embedded parent maps" --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 06d7630..a91307d 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2011-07-19 Katsumi Yamaoka + + * wl-e21.el (wl-e21-make-toolbar-buttons): Work around the Emacs + 24 error: "`keymap' is reserved for embedded parent maps" + 2011-07-15 Herbert J. Skuhra * wl-folder.el (wl-folder-open-unread-folder): Fix typo in diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 89bdaa7..f5db2f6 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -215,6 +215,7 @@ (tool-bar-button-margin . 2) (tool-bar-button-relief . 1))) +;; FIXME: this function should be rewritten in a proper way. (defun wl-e21-make-toolbar-buttons (keymap defs) (let ((configs wl-e21-toolbar-configurations) config) @@ -225,16 +226,18 @@ item) (while (setq item (pop keys)) (when (setq item (car-safe item)) - (define-key keymap (vector 'tool-bar item) 'undefined)))) + (ignore-errors ;; workaround + (define-key keymap (vector 'tool-bar item) 'undefined))))) (let ((n (length defs)) def) (while (>= n 0) (setq n (1- n) def (nth n defs)) - (define-key keymap (vector 'tool-bar (aref def 1)) - (list 'menu-item (aref def 3) (aref def 1) - :enable (aref def 2) - :image (symbol-value (aref def 0))))))) + (ignore-errors ;; workaround + (define-key keymap (vector 'tool-bar (aref def 1)) + (list 'menu-item (aref def 3) (aref def 1) + :enable (aref def 2) + :image (symbol-value (aref def 0)))))))) (defun wl-e21-setup-folder-toolbar () (when (wl-e21-setup-toolbar wl-folder-toolbar)