emacs-devel
[Top][All Lists]
Advanced

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

Defining keys in derived modes


From: Lennart Borgman (gmail)
Subject: Defining keys in derived modes
Date: Wed, 28 Feb 2007 10:37:14 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666

I have the following code

(define-derived-mode nxhtml-part-mode nxhtml-mode "nXhtmlPart"
  "Mode for editing part of an XHTML file.
Based on `nxhtml-mode."
  (nxml-part-mode-enter))

(defvar nxhtml-part-mode-map
  (let ((map (make-sparse-keymap)))
    (set-keymap-parent map nxhtml-mode-map)
    (define-key map [(control ?c) ?t] 'nxhtml-part-toggle-invisible-hf)
    map)
 "Keymap for `nxhtml-part-mode'.")

The keymap nxhtml-mpart-mode map then gets the doc string from above. I would expect it to also contain the definition of C-c t, but it does not. Should it behave this way? How should key bindings be done for derived modes?




reply via email to

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