summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/derived.el
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2017-01-14 01:47:52 -0500
committerNoam Postavsky <npostavs@gmail.com>2017-01-19 20:15:18 -0500
commit82a5e4dc889ecbfa35374616fe9c5edfa23f4504 (patch)
treed2117aff60cc9b49b2b7ecac362db0b9307656ac /lisp/emacs-lisp/derived.el
parent9c4e3097b595c739bb29261759b9ba631431329e (diff)
downloademacs-82a5e4dc889ecbfa35374616fe9c5edfa23f4504.tar.gz
emacs-82a5e4dc889ecbfa35374616fe9c5edfa23f4504.tar.bz2
emacs-82a5e4dc889ecbfa35374616fe9c5edfa23f4504.zip
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).
Diffstat (limited to 'lisp/emacs-lisp/derived.el')
-rw-r--r--lisp/emacs-lisp/derived.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 762c7624577..fffe972460c 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -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