emacs-devel
[Top][All Lists]
Advanced

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

Re: mykie.el


From: Yuta Yamada
Subject: Re: mykie.el
Date: Sun, 12 Jan 2014 13:32:54 -0500 (EST)

> > (mykie:define-key* global-map "C-j"

> Why this instead of

>   (define-key global-map "C-j" (mykie

There is a problem.
Mew.el that is Emacs mailer check function name whether the name
contain self-insert-command.(http://www.mew.org/en/)
(I don't know how many program does check global map's function-name.)

If we set keybind to self-insert-command like [a-z],
then Mew occur an error.

To solve this problem, mykie create function name automatically.
But to create function name, use keymap name and key name.

If I create the solving function. setting is like this?

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

User needs extra argument...

Or use `advice' to global-set-key, define-key?
I might can write more simply.

But if nobody care function name, then I could write:

(defmacro mykie:combined-command (&rest args)
  `(lambda ()
     (interactive)
     (mykei:core (quote ,args))))

(global-set-key (kbd "C-0")
   (mykie:combined-command :default (message "foo")))

Using anonymous function or named function, which is recommending?
I think we might create function to lookup the keybind information if
we choose named function.

Yuta



reply via email to

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