[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 83/287: Allow ergoemacs-rm-key to remove a list
From: |
Matthew Fidler |
Subject: |
[elpa] 83/287: Allow ergoemacs-rm-key to remove a list |
Date: |
Wed, 02 Jul 2014 14:44:50 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit 52c1d54ed6811f48f3726eff66cf5ff4fe5b8d55
Author: Matthew L. Fidler <address@hidden>
Date: Fri Jun 13 07:39:54 2014 -0500
Allow ergoemacs-rm-key to remove a list
---
ergoemacs-theme-engine.el | 52 ++++++++++++++++++++++++--------------------
1 files changed, 28 insertions(+), 24 deletions(-)
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index 6e4d154..29ea300 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -1235,7 +1235,8 @@ The actual keymap changes are included in
`ergoemacs-emulation-mode-map-alist'."
(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))
+ (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))
final-shortcut-map (ergoemacs-rm-key final-shortcut-map key)
@@ -2330,29 +2331,32 @@ If OFF is non-nil, turn off the options instead."
Also add global overrides from the current global map, if necessary.
Returns new keymap."
(if keymap
- (let ((new-keymap (copy-keymap keymap)))
- (cond
- ((keymapp (nth 1 new-keymap))
- (pop 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))))
- map)
- new-keymap))
- (push 'keymap new-keymap)
- new-keymap)
- (t
- (define-key new-keymap key nil)
- new-keymap)))))
+ (if (listp key)
+ (dolist (rm-key key)
+ (ergoemacs-rm-key keymap rm-key))
+ (let ((new-keymap (copy-keymap keymap)))
+ (cond
+ ((keymapp (nth 1 new-keymap))
+ (pop 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))))
+ map)
+ new-keymap))
+ (push 'keymap new-keymap)
+ new-keymap)
+ (t
+ (define-key new-keymap key nil)
+ new-keymap))))))
(defvar ergoemacs-M-x "M-x ")
- [elpa] 65/287: Add more emulation alists. Less list manipulation, (continued)
- [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, 2014/07/02
- [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 <=
- [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
- [elpa] 81/287: Added version menu back, Matthew Fidler, 2014/07/02
- [elpa] 87/287: Remove "Z" in theme component, Matthew Fidler, 2014/07/02
- [elpa] 144/287: Generate image based on options, Matthew Fidler, 2014/07/02
- [elpa] 86/287: Always suppress shortcuts in read-key-lookup, Matthew Fidler, 2014/07/02
- [elpa] 88/287: Apply defered variables/modes. Fix Issue #216, Matthew Fidler, 2014/07/02
- [elpa] 147/287: Allow emacs23 to fail., Matthew Fidler, 2014/07/02
- [elpa] 78/287: Faster ignore globally defined key, Matthew Fidler, 2014/07/02
- [elpa] 149/287: Backport `make-composed-keymap'., Matthew Fidler, 2014/07/02