]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix free var FOO-mode-{syntax,abbrev}-table warnings
authorNoam Postavsky <npostavs@gmail.com>
Sat, 14 Jan 2017 06:47:52 +0000 (01:47 -0500)
committerNoam Postavsky <npostavs@gmail.com>
Fri, 20 Jan 2017 01:15:18 +0000 (20:15 -0500)
* 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).

lisp/emacs-lisp/derived.el

index 762c7624577263753a54a2203df8392aed4c650a..fffe972460c38ee156c187bcf49d86facc8ce2f0 100644 (file)
@@ -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