emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where do you add key bindings for a mode made with define-derived-mo


From: Stefan Monnier
Subject: Re: Where do you add key bindings for a mode made with define-derived-mode
Date: Wed, 29 Dec 2010 10:43:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> Do you do that after the defining the major mode (i.e. when loading
> the library where it is defined) or is there another way?

The usual way:

   (defvar foo-mode-map
     (let ((map (make-sparse-keymap)))
       (define-key map foo bar)
       map))
   
   (define-derived-mode foo-mode ...)

Tho, maybe I simply misunderstood your question.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]