emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 131/287: Be more careful in error checking for ergoemacs-rm-key


From: Matthew Fidler
Subject: [elpa] 131/287: Be more careful in error checking for ergoemacs-rm-key
Date: Wed, 02 Jul 2014 14:45:18 +0000

mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.

commit d17bc71b49586d1a3357d08274c2bdd7660cbc47
Author: Matthew L. Fidler <address@hidden>
Date:   Wed Jun 18 09:30:01 2014 -0500

    Be more careful in error checking for ergoemacs-rm-key
---
 ergoemacs-theme-engine.el |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index 5d8ab6b..ed7cf61 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -2256,15 +2256,16 @@ Returns new keymap."
             (setq new-keymap
                   (mapcar
                    (lambda(map)
-                     (let ((lk (lookup-key map key)) lk2 lk3)
-                       (cond
-                        ((integerp lk)
-                         (setq lk2 (lookup-key (current-global-map) key))
-                         (setq lk3 (lookup-key map (substring key 0 lk)))
-                         (when (and (or (commandp lk2) (keymapp lk2)) (not 
lk3))
-                           (define-key map key lk2)))
-                        (lk
-                         (define-key map key nil))))
+                     (if (not (ignore-errors (keymapp map))) map
+                       (let ((lk (lookup-key map key)) lk2 lk3)
+                         (cond
+                          ((integerp lk)
+                           (setq lk2 (lookup-key (current-global-map) key))
+                           (setq lk3 (lookup-key map (substring key 0 lk)))
+                           (when (and (or (commandp lk2) (keymapp lk2)) (not 
lk3))
+                             (define-key map key lk2)))
+                          (lk
+                           (define-key map key nil)))))
                      map)
                    new-keymap))
             (push 'keymap new-keymap)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]