]> git.eshelyaron.com Git - emacs.git/commitdiff
change auto-insert to use derived-mode-p
authorTom Tromey <tom@tromey.com>
Sat, 18 Mar 2017 21:53:56 +0000 (22:53 +0100)
committerTom Tromey <tom@tromey.com>
Wed, 5 Apr 2017 21:53:38 +0000 (15:53 -0600)
* lisp/autoinsert.el (auto-insert): Use derived-mode-p.

lisp/autoinsert.el

index 2ca557c52b7dc2a8b94fea657ba89cc414a88a53..fef42161bf3aa9d0e83958f36686f137f36a9d9f 100644 (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))