diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-06-12 16:57:08 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-06-12 16:57:08 +0000 |
commit | 84ae4908754ec6fbbca63c04f0e48bddace14a81 (patch) | |
tree | 7d802ad7667db8e77120ee512ac20d21fa4fd4d9 /lisp/emacs-lisp/derived.el | |
parent | 0e659f576a0f6ee276a979b1fa382b2f1cfd580c (diff) | |
download | emacs-84ae4908754ec6fbbca63c04f0e48bddace14a81.tar.gz |
Add comment.
Diffstat (limited to 'lisp/emacs-lisp/derived.el')
-rw-r--r-- | lisp/emacs-lisp/derived.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 5ba9c094355..943f052fc6d 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -1,5 +1,5 @@ ;;; derived.el --- allow inheritance of major modes -;;; (formerly mode-clone.el) +;; (formerly mode-clone.el) ;; Copyright (C) 1993, 1994, 1999, 2003 Free Software Foundation, Inc. @@ -221,6 +221,12 @@ See Info node `(elisp)Derived Modes' for more details." (get (quote ,parent) 'mode-class))) ; Set up maps and tables. (unless (keymap-parent ,map) + ;; It would probably be better to set the keymap's parent + ;; at the toplevel rather than inside the mode function, + ;; but this is not easy for at least the following reasons: + ;; - the parent (and its keymap) may not yet be loaded. + ;; - the parent's keymap name may be called something else + ;; than <parent>-mode-map. (set-keymap-parent ,map (current-local-map))) ,(when declare-syntax `(let ((parent (char-table-parent ,syntax))) @@ -440,5 +446,5 @@ Where the new table already has an entry, nothing is copied from the old one." (provide 'derived) -;;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0 +;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0 ;;; derived.el ends here |