[Top][All Lists]

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

Re: managing my keybindings

From: LanX
Subject: Re: managing my keybindings
Date: Sun, 9 May 2010 11:21:07 -0700 (PDT)
User-agent: G2/1.0


I found this approach using aliases

in a config file tst.el I write
(defalias 'my-comment-indent 'comment-indent "DOCUMENTATION")

(local-set-key "#" 'my-comment-indent)

C-h k # will show me now

# runs the command my-comment-indent, which is an alias for `comment-
indent' in

It is bound to #.

(my-comment-indent &optional CONTINUE)


Now in "C-h m" and "C-h b" I will be able to identify my bindings
because of the leading "my-".

Creating a hs-minor-mode would be sufficient for hiding the rest.

What I'm struggling with is the best way to create a defmacro/defun
called "mine" such that I can automate the aliasing and can write
something like

(local-set-key "#" (mine 'comment-indent) )

reply via email to

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