[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Toggle Keybinding
From: |
wenbinye |
Subject: |
Re: Toggle Keybinding |
Date: |
30 Jul 2006 03:33:57 -0700 |
User-agent: |
G2/0.2 |
The key binding syntax is not right, use "\M-+" instead.
It is better to use c++-mode-map:
(add-hook 'c++-mode-hook
(lambda ()
(define-key c++-mode-map "\M-+" 'hs-toggle-hiding)))
Paulo J. Matos wrote:
> Hi,
> I'm setting in .emacs (cvs-emacs) the following:
> (add-hook 'c++-mode-hook 'hs-minor-mode)
>
> (add-hook 'c++-mode-hook
> (lambda ()
> (local-set-key "M-+" 'hs-toggle-hiding)))
>
> For some reason the keybinding is not working. But if I do
> local-set-key in emacs everything seems to go fine! :-)
>
> Any ideas? Should the + in "M-+" be escaped somehow?
>
> --
> Paulo Jorge Matos - pocm at sat inesc-id pt
> Web: http://sat.inesc-id.pt/~pocm
> Computer and Software Engineering
> INESC-ID - SAT Group