[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 75/287: Only put in shortcut-hash if not removed from keymap.
From: |
Matthew Fidler |
Subject: |
[elpa] 75/287: Only put in shortcut-hash if not removed from keymap. |
Date: |
Wed, 02 Jul 2014 14:44:45 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit be059f1d1c4a5e4d818fb5d73705181d809b1a65
Author: Matthew L. Fidler <address@hidden>
Date: Thu Jun 12 09:49:35 2014 -0500
Only put in shortcut-hash if not removed from keymap.
---
ergoemacs-theme-engine.el | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index 913f6eb..80c8d56 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -978,7 +978,8 @@ Assumes maps are orthogonal."
(push (oref map-obj hook) append-ret))))
maps)
(puthash (list match ret) append-ret hooks)
- (oset obj hooks hooks))
+ (oset obj hooks hooks)
+ (ergoemacs-theme-component-maps--save-hash obj))
(setq ret (append append-ret ret))
ret)))
@@ -1135,6 +1136,7 @@ FULL-SHORTCUT-MAP-P "
;; (map (or map (make-sparse-keymap)))
(menu-keymap (make-sparse-keymap))
final-map final-shortcut-map final-read-map
+ (rm-list (append rm-keys ergoemacs-global-override-rm-keys))
(i 0))
;; Get all the major-mode hooks that will be called or modified
(setq ergoemacs-deferred-maps '()
@@ -1231,13 +1233,13 @@ The actual keymap changes are included in
`ergoemacs-emulation-mode-map-alist'."
final-unbind-map (copy-keymap unbind-map)
final-read-map (copy-keymap read-map)
final-map (copy-keymap map))
- (dolist (key (append rm-keys ergoemacs-global-override-rm-keys))
+ (dolist (key rm-list)
(let ((vector-key (or (and (vectorp key) key)
(read-kbd-macro (key-description key) t))))
(setq final-read-map (or (and (memq (elt vector-key 0) '(3 24)) ;;
Keep `C-c' and `C-x'.
(memq (lookup-key final-read-map
(vector (elt vector-key 0))) '(ergoemacs-ctl-x ergoemacs-ctl-c))
final-read-map)
- (ergoemacs-rm-key final-read-map key))
+ (ergoemacs-rm-key final-read-map key))
final-shortcut-map (ergoemacs-rm-key final-shortcut-map key)
final-map (ergoemacs-rm-key final-map key)
final-unbind-map (ergoemacs-rm-key final-unbind-map key))))
@@ -1253,13 +1255,14 @@ The actual keymap changes are included in
`ergoemacs-emulation-mode-map-alist'."
;; Rebuild Shortcut hash
(let (tmp)
(dolist (c (reverse shortcut-list))
- (puthash (nth 0 c) (nth 1 c) ergoemacs-command-shortcuts-hash)
- (when (eq (nth 1 (nth 1 c)) 'global)
- (dolist (global-key (ergoemacs-shortcut-function-binding (nth 0
(nth 1 c))))
- (if (not (gethash global-key
ergoemacs-original-keys-to-shortcut-keys))
- (puthash global-key (append (gethash global-key
ergoemacs-original-keys-to-shortcut-keys) (list (nth 0 c)))
ergoemacs-original-keys-to-shortcut-keys)
- (push (key-description global-key) tmp)
- (puthash global-key (list (nth 0 c))
ergoemacs-original-keys-to-shortcut-keys)))))
+ (unless (member (nth 0 c) rm-list)
+ (puthash (nth 0 c) (nth 1 c) ergoemacs-command-shortcuts-hash)
+ (when (eq (nth 1 (nth 1 c)) 'global)
+ (dolist (global-key (ergoemacs-shortcut-function-binding (nth
0 (nth 1 c))))
+ (if (not (gethash global-key
ergoemacs-original-keys-to-shortcut-keys))
+ (puthash global-key (append (gethash global-key
ergoemacs-original-keys-to-shortcut-keys) (list (nth 0 c)))
ergoemacs-original-keys-to-shortcut-keys)
+ (push (key-description global-key) tmp)
+ (puthash global-key (list (nth 0 c))
ergoemacs-original-keys-to-shortcut-keys))))))
(setq ergoemacs-original-keys-to-shortcut-keys-regexp
(regexp-opt tmp t))))
;; Turn on/off ergoemacs-mode
- [elpa] 59/287: Fix typo, (continued)
- [elpa] 59/287: Fix typo, Matthew Fidler, 2014/07/02
- [elpa] 61/287: Ergoemacs-mode setup with object almost complete., Matthew Fidler, 2014/07/02
- [elpa] 66/287: Make ergoemacs-clean toggle debug on error, Matthew Fidler, 2014/07/02
- [elpa] 71/287: Fix isearch issues., Matthew Fidler, 2014/07/02
- [elpa] 60/287: Ensure the object-name is a string. EIEIO seems to prefer this., Matthew Fidler, 2014/07/02
- [elpa] 69/287: Install shortcut-layer appropriately for keymaps., Matthew Fidler, 2014/07/02
- [elpa] 73/287: use remove-duplicates instead, Matthew Fidler, 2014/07/02
- [elpa] 70/287: Fix most global-set-key after issues, Matthew Fidler, 2014/07/02
- [elpa] 65/287: Add more emulation alists. Less list manipulation, Matthew Fidler, 2014/07/02
- [elpa] 74/287: Fix <apps> e t bug with object interface., Matthew Fidler, 2014/07/02
- [elpa] 75/287: Only put in shortcut-hash if not removed from keymap.,
Matthew Fidler <=
- [elpa] 68/287: Make the caching more robust, Matthew Fidler, 2014/07/02
- [elpa] 72/287: Fix copy objects to allow keymap versions., Matthew Fidler, 2014/07/02
- [elpa] 79/287: Fix final map to be a composed keymap that works with ergoemacs-rm-key, Matthew Fidler, 2014/07/02
- [elpa] 76/287: Only Issue 86 still persists., Matthew Fidler, 2014/07/02
- [elpa] 77/287: Ensure ergoemacs-global-override-rm-keys is a list of vectors, Matthew Fidler, 2014/07/02
- [elpa] 80/287: Reverse order to allow <apps> h z processing., Matthew Fidler, 2014/07/02
- [elpa] 82/287: Ignored keys shouldn't be in the shortcut hash, Matthew Fidler, 2014/07/02
- [elpa] 83/287: Allow ergoemacs-rm-key to remove a list, Matthew Fidler, 2014/07/02
- [elpa] 84/287: Break-out sending unread-command events, Matthew Fidler, 2014/07/02
- [elpa] 85/287: Keep track of shortcut key prefixes, Matthew Fidler, 2014/07/02