From: Bill Clementson <bc19191@attbi.com>
Subject: Re: Creating a "shortcut" key for "C-c C-"
Date: Wed, 23 Apr 2003 03:45:17 GMT [thread overview]
Message-ID: <wklly1op23.fsf@attbi.com> (raw)
In-Reply-To: 5llly2k365.fsf@rum.cs.yale.edu
"Stefan Monnier" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> writes:
> > Maybe it works to do
> > (global-set-key (kbd "<f4>") (kbd "C-c C-x @ c"))
>
> That won't work: the C-x @ c thingy works in function-key-map,
> i.e. before almost all keymaps.
> Furthermore, (define-key function-key-map [f8] "\C-c\C-x@c") won't work
> either because the output of function-key-map is not fed back to
> function-key-map.
> And I can't think of any map that applies before function-key-map and
> that can do such mapping.
>
> But you can do:
>
> (defun C-cC- (prompt)
(vconcat "\C-c" (event-apply-control-modifier prompt)))
> (define-key function-key-map [f8] 'C-cC-)
Sounds great; unfortunately, it doesn't work for me :-(
When I evaluate the above forms, I tried pressing "f8-n" in a buffer
that has a keybinding to "C-c C-n". I thought that the "f8-n" keybinding
would result in the execution of the same command that was bound to "C-c
C-n". Unfortunately, the only thing that happened was that an "n" was
inserted into the buffer. When I run the command "describe-key" on
"f8-n", it says that "n runs the command self-insert-command
(self-insert-command N)". Am I missing some step?
Thanks for your help.
--
Bill Clementson
next prev parent reply other threads:[~2003-04-23 3:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-22 1:55 Creating a "shortcut" key for "C-c C-" Bill Clementson
2003-04-22 6:15 ` Kai Großjohann
2003-04-22 14:38 ` Stefan Monnier
2003-04-23 3:45 ` Bill Clementson [this message]
2003-04-23 13:27 ` Stefan Monnier
2003-04-23 15:37 ` Reiner Steib
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wklly1op23.fsf@attbi.com \
--to=bc19191@attbi.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.