[Top][All Lists]

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

Re: mykie.el

From: Yuta Yamada
Subject: Re: mykie.el
Date: Thu, 09 Jan 2014 13:43:43 -0500 (EST)

Sorry, I forgot to conform a problem when we define keybind by
anonymous function to [a-z] key of self-insert-command.

rubikitch who contribute mykie.el about this problem pull-requested :

If we define contextual-command by anonymous function, cannot use
I'm not sure the detail.
But actually I couldn't use old version mykie's keybind related
self-insert-command at Mew.el.
(I heard Mew.el make sure keybind's name from @rubikitch on twitter)

Old version mykie.el registration form is like this:
※ this form can use current version too
(global-set-key "a"
                (lambda ()
                  (mykie :default 'self-insert-command
                         :C-u     '(message "C-u"))))

Current version(future branch):

(mykie:define-key-with-self-key "a"
  ;; we don't need self-insert-command
  :C-u     (message "C-u"))


(mykie:global-set-key "a"
  ;; you can specify t instead of :default too
  :default self-insert-command
  :C-u     (message "C-u"))


(mykie:define-key global-map "a"
  :default self-insert-command
  :C-u     (message "C-u"))


Below function is more convenient than others.
This function can register multiple keybinds.

(mykie:set-keys 'with-self-key
  "a" :C-u     (message "C-u of a")
  "b" :C-u     (message "C-u of b"))

You can specify specific keymap instead of 'with-self-key.
If you specified nil then register keybinds to global-map.

(mykie:set-keys emacs-lisp-mode-map

  :default (message "default of C-0")
  :C-u     (message "C-u of C-0")

  :default (message "default of C-1")
  :C-u     (message "C-u of C-1")
  ;; you can add more keybinds

reply via email to

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