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

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

Curiostiy question re: keybinding ??


From: William Case
Subject: Curiostiy question re: keybinding ??
Date: Mon, 23 Jul 2007 15:32:55 -0400

Hi;

Found the following hint in the emacs FAQ.  "To interactively bind keys
for all modes, type `M-x global-set-key <RET> KEY CMD <RET>'
Use the following "trick": First bind the key interactively, then
immediately type `C-x <ESC> <ESC> C-a C-k C-g'". Then I yanked
to .emacs.

Used it; it works.  However, I get the following;

(global-set-key "^Cc" 'compile)  ;; Ctrl-c
(global-set-key "\363" 'shell-command)  ;; Meta (Alt)-s 
(global-set-key (quote [8388723]) (quote shell))  ;; Super (Win)-s
(global-set-key (quote [8388631]) (quote kill-whole-line))  ;;
Ctrl-Super-w

I replaced the (quote "command") with 'compile and 'shell-command in the
first and second line. It reads even easier.  I like the formulation of
the keys as "^Cc"; they are simple to understand and make common sense.
But why did emacs generate the various numerical forms. Is this the
best/fastest way to do a binding?

It would be hard to remember what the numbers mean with out some
comments or a lot of memorization.

Is the first line binding style going out of use (replaced by the kbd
keyword) or coming in?  What would be the ^C (Ctrl) equivalent for Meta
-- ^M; and, Super -- ^s; and, Shift -- ^,?  What about Fx keys and
others?

This is not a complaint, nor I am I looking for a big dissertation.  I
have been to all the info, wiki and tidy sites.  Just wondering.

-- 
Regards Bill





reply via email to

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