all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Key binding problem
@ 2007-02-26 13:23 tubescreamer808
  2007-02-26 13:33 ` weber
  0 siblings, 1 reply; 10+ messages in thread
From: tubescreamer808 @ 2007-02-26 13:23 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

I'm trying to bind a few keys in c mode and so far, didn't have much
success with it. I have the following defined in my .emacs:

(defun my-c-mode-common-hook ()
  (local-set-key [C-|] 'indent-region)
  (local-set-key [C-%] 'query-replace-regexp)
  (local-set-key (kbd "RET") 'newline-and-indent)
  (local-set-key [C-/] 'comment-region)
  (local-set-key [C-?] 'uncomment-region)
  (c-subword-mode 1)
  )

(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)

The only binding that works is the one for the newline-and-indent
command. For the other ones, emacs tells me that the key combination
is not defined. However, if I run local-set-key interactively once
emacs is done loading and after visiting a C++ file, it works. I tried
the same bindings in c++-mode-hook but, unsurprisingly, it made no
difference at all which.

What am I doing wrong?

Thanks in advance
Jean

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-02-27 10:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-26 13:23 Key binding problem tubescreamer808
2007-02-26 13:33 ` weber
2007-02-26 14:19   ` tubescreamer808
2007-02-26 16:12   ` Lennart Borgman (gmail)
     [not found]   ` <mailman.118.1172506366.7795.help-gnu-emacs@gnu.org>
2007-02-26 16:54     ` tubescreamer808
2007-02-26 18:41       ` Xavier Maillard
2007-02-26 19:15         ` Drew Adams
2007-02-26 20:28           ` Xavier Maillard
     [not found]           ` <mailman.136.1172521894.7795.help-gnu-emacs@gnu.org>
2007-02-27  8:50             ` tubescreamer808
2007-02-27 10:15               ` Lennart Borgman (gmail)

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.