Fix free var FOO-mode-{syntax,abbrev}-table warnings
* lisp/emacs-lisp/derived.el (define-derived-mode): Unconditionally defvar the syntax and abbrev tables so that the compiler will know that they are dynamically bound variables (Bug#25446).
This commit is contained in:
parent
9c4e3097b5
commit
82a5e4dc88
1 changed files with 2 additions and 0 deletions
|
@ -216,6 +216,7 @@ No problems result if this variable is not bound.
|
|||
(purecopy ,(format "Keymap for `%s'." child))))
|
||||
,(if declare-syntax
|
||||
`(progn
|
||||
(defvar ,syntax)
|
||||
(unless (boundp ',syntax)
|
||||
(put ',syntax 'definition-name ',child)
|
||||
(defvar ,syntax (make-syntax-table)))
|
||||
|
@ -224,6 +225,7 @@ No problems result if this variable is not bound.
|
|||
(purecopy ,(format "Syntax table for `%s'." child))))))
|
||||
,(if declare-abbrev
|
||||
`(progn
|
||||
(defvar ,abbrev)
|
||||
(unless (boundp ',abbrev)
|
||||
(put ',abbrev 'definition-name ',child)
|
||||
(defvar ,abbrev
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue