unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim Johnson <tim@johnsons-web.com>
Subject: Re: Binding Keymap prefix to Major Mode
Date: Sat, 02 Apr 2005 12:57:01 -0900	[thread overview]
Message-ID: <114u58aca1q7g58@news.supernews.com> (raw)
In-Reply-To: <87br8x547i.fsf-monnier+gnu.emacs.help@gnu.org>

Stefan Monnier wrote:
>>(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)
> 
> 
> Seeing the code above, I *strongly* suggest you google for "sample-mode.el"
> and try to start from that instead.
> 
> 
>         Stefan

Hello Stefan:

Thank you very much,that is something that I have been looking for - an 
example of how to set up a mode.

FYI: The solution has proven to be just to change
(use-local-map rebol-keymap)  ;; to
(local-set-key rebol-keymap-prefix rebol-keymap)

Now keybindings work as I would expect them to.

I have googled for "sample-mode.el" and have found only two
references, but no code. In fact what I find are emails from
you and since you appear to be the author, I would deeply appreciate it
if you could provide a link for this file.

Regards
Tim Johnson
   ----------------------------
   Senior Programer/Analyst
   Alaska Internet Solutions

  reply	other threads:[~2005-04-02 21:57 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
2005-04-02  3:08   ` Tim Johnson
2005-04-02 20:13 ` Stefan Monnier
2005-04-02 21:57   ` Tim Johnson [this message]
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=114u58aca1q7g58@news.supernews.com \
    --to=tim@johnsons-web.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.
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).