Minor fix for define-derived-mode
* lisp/emacs-lisp/derived.el (define-derived-mode): Do not let eg eval-defun reset the values of syntax or abbrev tables, since they might have been defined externally. (Bug#16160)
This commit is contained in:
parent
3e651e3c6b
commit
8db7b65d66
1 changed files with 6 additions and 5 deletions
|
@ -217,16 +217,17 @@ No problems result if this variable is not bound.
|
|||
,(if declare-syntax
|
||||
`(progn
|
||||
(unless (boundp ',syntax)
|
||||
(put ',syntax 'definition-name ',child))
|
||||
(defvar ,syntax (make-syntax-table))
|
||||
(put ',syntax 'definition-name ',child)
|
||||
(defvar ,syntax (make-syntax-table)))
|
||||
(unless (get ',syntax 'variable-documentation)
|
||||
(put ',syntax 'variable-documentation
|
||||
(purecopy ,(format "Syntax table for `%s'." child))))))
|
||||
,(if declare-abbrev
|
||||
`(progn
|
||||
(put ',abbrev 'definition-name ',child)
|
||||
(defvar ,abbrev
|
||||
(progn (define-abbrev-table ',abbrev nil) ,abbrev))
|
||||
(unless (boundp ',abbrev)
|
||||
(put ',abbrev 'definition-name ',child)
|
||||
(defvar ,abbrev
|
||||
(progn (define-abbrev-table ',abbrev nil) ,abbrev)))
|
||||
(unless (get ',abbrev 'variable-documentation)
|
||||
(put ',abbrev 'variable-documentation
|
||||
(purecopy ,(format "Abbrev table for `%s'." child))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue