unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: LanX <lanx.perl@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: managing my keybindings
Date: Sun, 9 May 2010 11:21:07 -0700 (PDT)	[thread overview]
Message-ID: <d81368ef-9b0b-4ba3-9f90-907898eeb43b@i9g2000yqi.googlegroups.com> (raw)
In-Reply-To: 89f1a7ef-b8e5-41e9-8571-17ef186b78b4@e1g2000yqe.googlegroups.com

Hi

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
  `tst.el'.

It is bound to #.

(my-comment-indent &optional CONTINUE)

DOCUMENTATION
------------------------------


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) )


  parent reply	other threads:[~2010-05-09 18:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-08  0:38 managing my keybindings LanX
2010-05-08  2:09 ` Lennart Borgman
2010-05-08 12:22   ` LanX
     [not found] ` <mailman.0.1273284589.603.help-gnu-emacs@gnu.org>
2010-05-09 11:29   ` Andreas Politz
2010-05-09 11:55     ` Lennart Borgman
2010-05-09 18:21 ` LanX [this message]
2010-05-09 19:12   ` LanX
2010-05-10 14:10     ` Stefan Monnier
2010-05-10 14:25       ` LanX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d81368ef-9b0b-4ba3-9f90-907898eeb43b@i9g2000yqi.googlegroups.com \
    --to=lanx.perl@googlemail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).