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

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

[elpa] 132/287: Be more careful when redefining maps.


From: Matthew Fidler
Subject: [elpa] 132/287: Be more careful when redefining maps.
Date: Wed, 02 Jul 2014 14:45:19 +0000

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

commit dbb55443e24c0350d2728e36176a5475882afd38
Author: Matthew L. Fidler <address@hidden>
Date:   Wed Jun 18 09:38:07 2014 -0500

    Be more careful when redefining maps.
---
 ergoemacs-theme-engine.el |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index ed7cf61..a8b0226 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -1781,14 +1781,15 @@ DONT-COLLAPSE doesn't collapse empty keymaps"
           (when reset ;; Reset keymaps
             ;; Reset keymaps.
             (dolist (map '(ergoemacs-shortcut-keymap 
ergoemacs-read-input-keymap ergoemacs-keymap ergoemacs-unbind-keymap))
-              (set map (ergoemacs-rm-key (symbol-value map) key))
-              (setq lk (lookup-key (symbol-value map) key))
-              (if (not (integerp lk))
-                  (setq test-key key)
-                (setq test-key (substring key 0 lk))
-                (setq lk (lookup-key (symbol-value map) test-key)))
-              (when (commandp lk t)
-                (set map (ergoemacs-rm-key (symbol-value map) test-key))))
+              (when (symbol-value map)
+                (set map (ergoemacs-rm-key (symbol-value map) key))
+                (setq lk (lookup-key (symbol-value map) key))
+                (if (not (integerp lk))
+                    (setq test-key key)
+                  (setq test-key (substring key 0 lk))
+                  (setq lk (lookup-key (symbol-value map) test-key)))
+                (when (commandp lk t)
+                  (set map (ergoemacs-rm-key (symbol-value map) test-key)))))
             ;; Remove from shortcuts, if present
             (remhash key ergoemacs-command-shortcuts-hash)
             ;; Reset `ergoemacs-shortcut-prefix-keys'



reply via email to

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