help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Creating a "shortcut" key for "C-c C-"


From: Stefan Monnier
Subject: Re: Creating a "shortcut" key for "C-c C-"
Date: 22 Apr 2003 10:38:42 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

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


        Stefan


reply via email to

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