diff options
author | Juri Linkov <juri@jurta.org> | 2005-12-04 02:33:41 +0000 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2005-12-04 02:33:41 +0000 |
commit | cc793355dc8b8b9c2d75e8554b03c0026f035ed6 (patch) | |
tree | d5b3bac75358c974e8590818701884cb43988a47 /lisp/emacs-lisp/derived.el | |
parent | c6a3142d9ea24dd406ced9f3ec1177dfe8356ccd (diff) | |
download | emacs-cc793355dc8b8b9c2d75e8554b03c0026f035ed6.tar.gz |
(define-derived-mode): Put `definition-name'
properties on the constructed variable names.
Diffstat (limited to 'lisp/emacs-lisp/derived.el')
-rw-r--r-- | lisp/emacs-lisp/derived.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index e595ff92a39..899c40456e7 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -200,12 +200,19 @@ See Info node `(elisp)Derived Modes' for more details." No problems result if this variable is not bound. `add-hook' automatically binds it. (This is true for all hook variables.)" name))) + (unless (boundp ',map) + (put ',map 'definition-name ',child)) (defvar ,map (make-sparse-keymap)) ,(if declare-syntax - `(defvar ,syntax (make-syntax-table))) + `(progn + (unless (boundp ',syntax) + (put ',syntax 'definition-name ',child)) + (defvar ,syntax (make-syntax-table)))) ,(if declare-abbrev - `(defvar ,abbrev - (progn (define-abbrev-table ',abbrev nil) ,abbrev))) + `(progn + (put ',abbrev 'definition-name ',child) + (defvar ,abbrev + (progn (define-abbrev-table ',abbrev nil) ,abbrev)))) (put ',child 'derived-mode-parent ',parent) ,(if group `(put ',child 'custom-mode-group ,group)) |