diff options
| author | Juri Linkov | 2005-12-04 02:33:41 +0000 |
|---|---|---|
| committer | Juri Linkov | 2005-12-04 02:33:41 +0000 |
| commit | cc793355dc8b8b9c2d75e8554b03c0026f035ed6 (patch) | |
| tree | d5b3bac75358c974e8590818701884cb43988a47 | |
| parent | c6a3142d9ea24dd406ced9f3ec1177dfe8356ccd (diff) | |
| download | emacs-cc793355dc8b8b9c2d75e8554b03c0026f035ed6.tar.gz emacs-cc793355dc8b8b9c2d75e8554b03c0026f035ed6.zip | |
(define-derived-mode): Put `definition-name'
properties on the constructed variable names.
| -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." | |||
| 200 | No problems result if this variable is not bound. | 200 | No problems result if this variable is not bound. |
| 201 | `add-hook' automatically binds it. (This is true for all hook variables.)" | 201 | `add-hook' automatically binds it. (This is true for all hook variables.)" |
| 202 | name))) | 202 | name))) |
| 203 | (unless (boundp ',map) | ||
| 204 | (put ',map 'definition-name ',child)) | ||
| 203 | (defvar ,map (make-sparse-keymap)) | 205 | (defvar ,map (make-sparse-keymap)) |
| 204 | ,(if declare-syntax | 206 | ,(if declare-syntax |
| 205 | `(defvar ,syntax (make-syntax-table))) | 207 | `(progn |
| 208 | (unless (boundp ',syntax) | ||
| 209 | (put ',syntax 'definition-name ',child)) | ||
| 210 | (defvar ,syntax (make-syntax-table)))) | ||
| 206 | ,(if declare-abbrev | 211 | ,(if declare-abbrev |
| 207 | `(defvar ,abbrev | 212 | `(progn |
| 208 | (progn (define-abbrev-table ',abbrev nil) ,abbrev))) | 213 | (put ',abbrev 'definition-name ',child) |
| 214 | (defvar ,abbrev | ||
| 215 | (progn (define-abbrev-table ',abbrev nil) ,abbrev)))) | ||
| 209 | (put ',child 'derived-mode-parent ',parent) | 216 | (put ',child 'derived-mode-parent ',parent) |
| 210 | ,(if group `(put ',child 'custom-mode-group ,group)) | 217 | ,(if group `(put ',child 'custom-mode-group ,group)) |
| 211 | 218 | ||