[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 21/287: Remove unused ergoemacs-define-key
From: |
Matthew Fidler |
Subject: |
[elpa] 21/287: Remove unused ergoemacs-define-key |
Date: |
Wed, 02 Jul 2014 14:44:16 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit e6773460ffc69b1d28840d8822769dd10cecfad5
Author: Matthew L. Fidler <address@hidden>
Date: Thu May 29 09:18:32 2014 -0500
Remove unused ergoemacs-define-key
---
ergoemacs-shortcuts.el | 103 ------------------------------------------------
1 files changed, 0 insertions(+), 103 deletions(-)
diff --git a/ergoemacs-shortcuts.el b/ergoemacs-shortcuts.el
index 5931e04..e7f4602 100644
--- a/ergoemacs-shortcuts.el
+++ b/ergoemacs-shortcuts.el
@@ -1371,110 +1371,7 @@ argument prompt.
ergoemacs-mark-active nil))
(setq ergoemacs-describe-key nil))
-(defun ergoemacs-define-key (keymap key def)
- "Defines KEY in KEYMAP to be DEF.
-Similar to `define-key'.
-DEF can be:
-1. A function; If globally defined, this is defined by
- `ergoemacs-shortcut-remap'
-2. A list of functions
-3. A keymap
-4. A kbd-code that this shortcuts to with `ergoemacs-read'
-
-"
- (cond
- ((eq 'cons (type-of def))
- (let (found)
- (if (condition-case err
- (stringp (nth 0 def))
- (error nil))
- (if (and (boundp 'setup-ergoemacs-keymap) setup-ergoemacs-keymap)
- (progn
- (puthash (read-kbd-macro (key-description key) t)
- `(,(nth 0 def) ,(nth 1 def))
- ergoemacs-command-shortcuts-hash)
- (define-key ergoemacs-shortcut-keymap key
- 'ergoemacs-shortcut))
- (unless (lookup-key keymap key)
- (cond
- ((condition-case err
- (interactive-form (nth 0 def))
- (error nil))
- (define-key keymap key
- `(lambda(&optional arg)
- (interactive "P")
- (setq this-command last-command) ; Don't record this
command.
- ;; (setq prefix-arg current-prefix-arg)
- (ergoemacs-shortcut-remap ,(nth 0 def)))))
- (t
- (define-key keymap key
- `(lambda(&optional arg)
- (interactive "P")
- (setq this-command last-command) ; Don't record this
command.
- ;; (setq prefix-arg current-prefix-arg)
- (ergoemacs-read-key ,(nth 0 def) ',(nth 1 def))))))))
- (mapc
- (lambda(new-def)
- (unless found
- (when (condition-case err
- (interactive-form new-def)
- (error nil))
- (setq found
- (ergoemacs-define-key keymap key new-def)))))
- def))
- found))
- ((condition-case err
- (interactive-form def)
- (error nil))
- (cond
- ;; only setup on `ergoemacs-shortcut-keymap' when setting up
- ;; ergoemacs default keymap.
- ((and (boundp 'setup-ergoemacs-keymap) setup-ergoemacs-keymap
- (memq def '(ergoemacs-ctl-c ergoemacs-ctl-x)))
- (define-key ergoemacs-shortcut-keymap key def))
- ((and (not (string-match "\\(mouse\\|wheel\\)" (key-description key)))
- (boundp 'setup-ergoemacs-keymap) setup-ergoemacs-keymap
- (ergoemacs-shortcut-function-binding def))
- (puthash (read-kbd-macro (key-description key) t)
- (list def 'global) ergoemacs-command-shortcuts-hash)
- (if (ergoemacs-is-movement-command-p def)
- (if (let (case-fold-search) (string-match "\\(S-\\|[A-Z]$\\)"
(key-description key)))
- (define-key ergoemacs-shortcut-keymap key
'ergoemacs-shortcut-movement-no-shift-select)
- (define-key ergoemacs-shortcut-keymap key
'ergoemacs-shortcut-movement))
- (define-key ergoemacs-shortcut-keymap key 'ergoemacs-shortcut)))
- ((or (and (boundp 'setup-ergoemacs-keymap) setup-ergoemacs-keymap)
- (not (lookup-key keymap key)))
- (define-key keymap key def)))
- t)
- ((condition-case err
- (keymapp (symbol-value def))
- (error nil))
- (define-key keymap key (symbol-value def))
- t)
- ((condition-case err
- (stringp def)
- (error nil))
- (if (and (boundp 'setup-ergoemacs-keymap) setup-ergoemacs-keymap)
- (progn
- (puthash (read-kbd-macro (key-description key) t)
- `(,def nil)
- ergoemacs-command-shortcuts-hash)
- (if (ergoemacs-is-movement-command-p def)
- (if (let (case-fold-search) (string-match "\\(S-\\|[A-Z]$\\)"
(key-description key)))
- (define-key ergoemacs-shortcut-keymap key
'ergoemacs-shortcut-movement-no-shift-select)
- (define-key ergoemacs-shortcut-keymap key
'ergoemacs-shortcut-movement))
- (define-key ergoemacs-shortcut-keymap key 'ergoemacs-shortcut)))
- (unless (lookup-key keymap key)
- (define-key keymap key
- `(lambda(&optional arg)
- (interactive "P")
- (setq this-command last-command) ; Don't record this command.
- ;; (setq prefix-arg current-prefix-arg)
- (ergoemacs-read-key ,def)))))
-
- t)
- (t nil)))
(defvar ergoemacs-ignored-prefixes '(;; "C-h" "<f1>"
"C-x" "C-c" "ESC" "<escape>"))
- [elpa] 10/287: Took out usless argument to ergoemacs-global-set-key-after, (continued)
- [elpa] 10/287: Took out usless argument to ergoemacs-global-set-key-after, Matthew Fidler, 2014/07/02
- [elpa] 13/287: Activate advices in definitions., Matthew Fidler, 2014/07/02
- [elpa] 14/287: Fix `ergoemacs-populate-pre-command-hook', Matthew Fidler, 2014/07/02
- [elpa] 12/287: no-ergoemacs-advice -> ergoemacs-ignore-advice, Matthew Fidler, 2014/07/02
- [elpa] 15/287: Use strinp consp and vectorp, Matthew Fidler, 2014/07/02
- [elpa] 18/287: Load ergoemacs-test for clean ergoemacs-mode load., Matthew Fidler, 2014/07/02
- [elpa] 06/287: Don't use symbol-value, Matthew Fidler, 2014/07/02
- [elpa] 16/287: ergoemacs--key-message, Matthew Fidler, 2014/07/02
- [elpa] 17/287: fix some let bindings., Matthew Fidler, 2014/07/02
- [elpa] 20/287: Add requires for byte-compile, Matthew Fidler, 2014/07/02
- [elpa] 21/287: Remove unused ergoemacs-define-key,
Matthew Fidler <=
- [elpa] 22/287: Some cleanups for ergoemacs-setup-translation, Matthew Fidler, 2014/07/02
- [elpa] 19/287: Added `ergoemacs-read-key--echo-command`, Matthew Fidler, 2014/07/02
- [elpa] 24/287: Revert ergoemacs-translate, Matthew Fidler, 2014/07/02
- [elpa] 26/287: Fix ergoemacs-extras Issue #225., Matthew Fidler, 2014/07/02
- [elpa] 27/287: Added cl require for ergoemacs-functions (Issue #225)., Matthew Fidler, 2014/07/02
- [elpa] 28/287: Merge branch 'master' into eieio, Matthew Fidler, 2014/07/02
- [elpa] 25/287: Started allowing parsing of the ergoemacs-mode key objects., Matthew Fidler, 2014/07/02
- [elpa] 01/287: Stefan Monnier's Patch, Matthew Fidler, 2014/07/02
- [elpa] 30/287: Started adding modes and setq assignments., Matthew Fidler, 2014/07/02
- [elpa] 32/287: Fix Issue #226, Matthew Fidler, 2014/07/02