change auto-insert to use derived-mode-p

* lisp/autoinsert.el (auto-insert): Use derived-mode-p.
This commit is contained in:
Tom Tromey 2017-03-18 22:53:56 +01:00
parent 0074ed536b
commit a2a38790ee

View file

@ -348,7 +348,7 @@ Matches the visited file name against the elements of `auto-insert-alist'."
(setq desc (cdr cond)
cond (car cond)))
(if (if (symbolp cond)
(eq cond major-mode)
(derived-mode-p cond)
(and buffer-file-name
(string-match cond buffer-file-name)))
(setq action (cdr (car alist))