From 255041087c1dab2d275ab4e1869d7df19cce007d Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 19 Jul 2011 11:05:52 +0000 Subject: [PATCH] wl-e21.el (wl-e21-make-toolbar-buttons): Work around the Emacs 24 error: "`keymap' is reserved for embedded parent maps" --- wl/ChangeLog | 5 +++++ wl/wl-e21.el | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) 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) -- 1.7.10.4