From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: global-set-key not global?
Date: Thu, 05 Feb 2004 19:35:46 GMT [thread overview]
Message-ID: <jwvoesdwcd1.fsf-monnier+gnu.emacs.help@asado.iro.umontreal.ca> (raw)
In-Reply-To: mailman.1967.1076003924.928.help-gnu-emacs@gnu.org
> im using the following in my .emacs:
> (global-set-key "\C-j" 'bs-cycle-next)
> (global-set-key "\M-j" 'bs-cycle-previous)
> but a number of major modes still seem to have C-j bound to insert-newline.
> it works fine if i use local-set-key inside the add-hook for every mode, but
> seems like i shouldnt have to do this.
Indeed. Report those things as bugs.
> also, how can i use the semicolon in a keybinding. obviously, the following
> doesnt work:
> (global-set-key "\C-;" 'indent-for-comment)
Indeed, because C-; is not a character (contrary to C-a and a few other
such special cases) so you can't put it in a string.
Instead use the form [(control ?\;)].
> how can i escape the ";" character so that it doesnt look like a comment
> to elisp?
In your code above it should work just fine since it's inside a string.
When it's not inside a string use \ as I did above.
Stefan
next parent reply other threads:[~2004-02-05 19:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1967.1076003924.928.help-gnu-emacs@gnu.org>
2004-02-05 19:35 ` Stefan Monnier [this message]
[not found] ` <AB8C2728-59BF-11D8-ABDD-000A958A3AF4@mac.com>
2004-02-07 22:50 ` global-set-key not global? Emory Smith
[not found] ` <mailman.2070.1076194243.928.help-gnu-emacs@gnu.org>
2004-02-08 13:29 ` Kai Grossjohann
2004-02-09 19:18 ` Kevin Rodgers
2004-02-12 14:00 ` Kai Grossjohann
2004-02-05 17:54 Emory Smith
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvoesdwcd1.fsf-monnier+gnu.emacs.help@asado.iro.umontreal.ca \
--to=monnier@iro.umontreal.ca \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).