Permalink
Browse files

it passes all test

  • Loading branch information...
uk-ar committed May 18, 2013
1 parent 104ef70 commit 625699165d15e2ae96829070d742c4736f08fd93
Showing with 876 additions and 136 deletions.
  1. +18 −6 key-combo.el
  2. +818 −90 key-combo2.el
  3. +40 −40 test/key-combo-test.el
View
@@ -217,13 +217,18 @@ The binding is probably a symbol with a function definition."
(t (lexical-let ((com command))
(lambda ()
(interactive)
(when (and (not (null buffer-undo-list))
(not (eq buffer-undo-list t))
(eq (car buffer-undo-list) nil))
(setq buffer-undo-list (cdr buffer-undo-list)))
(key-combo-execute-macro com)))
)
);;end cond
)
(defun key-combo-elementp (element)
(or (functionp element)
(or ;;(functionp element)
(commandp element)
(stringp element)
(null element));;for unset key
)
@@ -341,6 +346,7 @@ which in most cases is shared with all other buffers in the same major mode.
(">=" . ">= ")
("C-M-x" . (key-combo-execute-original
(lambda ()
(interactive)
(let ((current-prefix-arg '(4)))
(call-interactively 'eval-defun)))));; lamda for message
("-" . (key-combo-execute-original));; for symbol name
@@ -543,6 +549,7 @@ which in most cases is shared with all other buffers in the same major mode.
(setq key-combo-start-position pos))
(defun key-combo-return ()
"Return to the position when sequence of calls of the same command was started."
(interactive)
(unless (eq key-combo-start-position nil)
(progn
(goto-char (car key-combo-start-position))
@@ -610,11 +617,14 @@ which in most cases is shared with all other buffers in the same major mode.
:group 'key-combo
:keymap (make-sparse-keymap)
(if key-combo-mode
(add-hook 'pre-command-hook
;;post-self-insert-hook
#'key-combo-pre-command-function nil t)
(remove-hook 'pre-command-hook
#'key-combo-pre-command-function t))
(add-hook 'post-command-hook #'my-key-combo-post-command-function t t)
(remove-hook 'post-command-hook #'my-key-combo-post-command-function t)
;; (add-hook 'pre-command-hook
;; ;;post-self-insert-hook
;; #'key-combo-pre-command-function nil t)
;; (remove-hook 'pre-command-hook
;; #'key-combo-pre-command-function t)
)
)
(defcustom key-combo-disable-modes nil
@@ -711,6 +721,8 @@ which in most cases is shared with all other buffers in the same major mode.
))
)))
(load "key-combo2.el")
;; (listify-key-sequence
;; (kbd "M-C-d M-C-d"))
;; (listify-key-sequence
Oops, something went wrong.

0 comments on commit 6256991

Please sign in to comment.