unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "rgb" <rbielaws@i1.net>
Subject: Re: Binding Keymap prefix to Major Mode
Date: 1 Apr 2005 18:26:10 -0800	[thread overview]
Message-ID: <1112408770.478029.237080@g14g2000cwa.googlegroups.com> (raw)
In-Reply-To: <114ro1mfgnlds46@news.supernews.com>


Tim Johnson wrote:
> Hi:
> I've been working on a major mode for the rebol programming language.
> The following code has been evaluated:
> (defvar rebol-keymap (make-sparse-keymap) "Rebol mode keymap")
> (defcustom rebol-keymap-prefix [(control ?')]
>    "*Keymap prefix string for rebol-keymap"
>    :type 'string
>    :group 'rebol)
> (local-set-key rebol-keymap-prefix rebol-keymap)
> (define-key rebol-keymap "b" 'previous-rebol-definition)
> ;; When I load a file that auto-loads the mode, I find
> ;; that "b" is bound to 'previous-rebol-definition, not
> ;; to "\C-' b" which is what I hope for.
> NOTE: I've tried [(control \')] and [(control c)(control c)]
> as prefix symbols with the same (lack of) results.
> I presume that something else needs to be done to properly bind
> this prefix to the keymap.
>
> All help, docs and examples are welcome.
>
It works for me.
I'm thinking the problem is in your rebol-mode function.
What does your (use-local-map ...) statement look like?
If it says (use-local-map rebol-keymap) that would
certainly explain it.

  reply	other threads:[~2005-04-02  2:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-01 23:59 Binding Keymap prefix to Major Mode Tim Johnson
2005-04-02  2:26 ` rgb [this message]
2005-04-02  3:08   ` Tim Johnson
2005-04-02 20:13 ` Stefan Monnier
2005-04-02 21:57   ` Tim Johnson
2005-04-02 22:30     ` Daniel Wright
     [not found]     ` <mailman.79.1112481245.30898.help-gnu-emacs@gnu.org>
2005-04-02 22:58       ` Tim Johnson

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=1112408770.478029.237080@g14g2000cwa.googlegroups.com \
    --to=rbielaws@i1.net \
    /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).