mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 22:20:24 -08:00
(define-derived-mode): Put `definition-name'
properties on the constructed variable names.
This commit is contained in:
parent
c6a3142d9e
commit
cc793355dc
1 changed files with 10 additions and 3 deletions
|
|
@ -200,12 +200,19 @@ See Info node `(elisp)Derived Modes' for more details."
|
||||||
No problems result if this variable is not bound.
|
No problems result if this variable is not bound.
|
||||||
`add-hook' automatically binds it. (This is true for all hook variables.)"
|
`add-hook' automatically binds it. (This is true for all hook variables.)"
|
||||||
name)))
|
name)))
|
||||||
|
(unless (boundp ',map)
|
||||||
|
(put ',map 'definition-name ',child))
|
||||||
(defvar ,map (make-sparse-keymap))
|
(defvar ,map (make-sparse-keymap))
|
||||||
,(if declare-syntax
|
,(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
|
,(if declare-abbrev
|
||||||
`(defvar ,abbrev
|
`(progn
|
||||||
(progn (define-abbrev-table ',abbrev nil) ,abbrev)))
|
(put ',abbrev 'definition-name ',child)
|
||||||
|
(defvar ,abbrev
|
||||||
|
(progn (define-abbrev-table ',abbrev nil) ,abbrev))))
|
||||||
(put ',child 'derived-mode-parent ',parent)
|
(put ',child 'derived-mode-parent ',parent)
|
||||||
,(if group `(put ',child 'custom-mode-group ,group))
|
,(if group `(put ',child 'custom-mode-group ,group))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue