From: wenbinye@gmail.com
Subject: Re: Toggle Keybinding
Date: 30 Jul 2006 03:33:57 -0700 [thread overview]
Message-ID: <1154255637.060982.204000@p79g2000cwp.googlegroups.com> (raw)
In-Reply-To: <mailman.4656.1154251955.9609.help-gnu-emacs@gnu.org>
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
next parent reply other threads:[~2006-07-30 10:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.4656.1154251955.9609.help-gnu-emacs@gnu.org>
2006-07-30 10:33 ` wenbinye [this message]
2006-07-30 11:00 ` Toggle Keybinding Harald Hanche-Olsen
2006-07-30 9:32 Paulo J. Matos
2006-07-31 15:17 ` Kevin Rodgers
2006-07-31 22:28 ` Paulo J. Matos
2006-08-01 15:22 ` Kevin Rodgers
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=1154255637.060982.204000@p79g2000cwp.googlegroups.com \
--to=wenbinye@gmail.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.