Commit a2a38790 authored by Tom Tromey's avatar Tom Tromey

change auto-insert to use derived-mode-p

* lisp/autoinsert.el (auto-insert): Use derived-mode-p.
parent 0074ed53
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment