From: Jambunathan K <kjambunathan@gmail.com>
To: Burkhard Schultheis <burkhard.schultheis@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: define a keybinding for "find next alternate definition of last tag specified"
Date: Thu, 28 Feb 2013 01:23:52 +0530 [thread overview]
Message-ID: <87bob5ildb.fsf@gmail.com> (raw)
In-Reply-To: <kgl356$b6q$1@news.albasani.net> (Burkhard Schultheis's message of "Wed, 27 Feb 2013 14:53:38 +0100")
You can let Emacs define stuff for you.
(fset 'find-alt-tag
(lambda (&optional arg) "Keyboard macro." (interactive "p")
(kmacro-exec-ring-item (quote ("\256" 0 "%d")) arg)))
(global-set-key [27 f9] (quote find-alt-tag))
Esc-F9 will find the alternate tag.
I have used kbd macros
C-x ( do something C-x )
C-x C-k n
M-x insert-kbd-macro
followed by
M-x global-set-key RET
M-x list-command-history RET
For background reading do this. Note the capital "K"
C-h K C-x (
C-h K C-x C-k n
ps: Gnus will truncate a C-u in the find-alt-tag definition above. But
you have the recipe now, so...
Burkhard Schultheis <burkhard.schultheis@web.de> writes:
> Am 27.02.2013 13:36, schrieb Burkhard Schultheis:
>> I want to have a single keystroke for the keystroke sequence C-u m-.
>> (find next alternate definition of last tag specified). as far as I see
>> there is no command associated with this action.
>>
>> How can I define a global key in my .emacs file for this action?
>>
>> Thank you in advance!
>>
>
> In the meantime I've tried it several ways, last test was:
>
> (defun find-next-tag ()
> "Find next tag with TAGS file"
> ((kdb <C-u>) (kbd <M-.>)))
>
> (global-set-key [M-f9] 'find-next-tag)
>
> If a try Alt-F9 I get an error message reading "Wrong type argument:
> commandp, find-next-tag"
>
> I've tried it with the function names, too, but I got every time the
> same error message.
>
> What's wrong and how to do it right?
>
> Regards
> Burkhard
>
>
--
next prev parent reply other threads:[~2013-02-27 19:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 12:36 define a keybinding for "find next alternate definition of last tag specified" Burkhard Schultheis
2013-02-27 13:53 ` Burkhard Schultheis
2013-02-27 19:23 ` define a keybinding for "find next alternate definition of lasttag specified" Drew Adams
2013-02-27 19:53 ` Jambunathan K [this message]
[not found] ` <mailman.21045.1361993039.855.help-gnu-emacs@gnu.org>
2013-02-28 8:31 ` Burkhard Schultheis
2013-02-28 15:00 ` define a keybinding for "find next alternate definition of last tag specified" Kevin Rodgers
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=87bob5ildb.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=burkhard.schultheis@web.de \
--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).