]> git.eshelyaron.com Git - emacs.git/commitdiff
Accept lexical lambda in auto-insert-alist
authorMattias Engdegård <mattiase@acm.org>
Mon, 22 Jun 2020 11:07:37 +0000 (13:07 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 22 Jun 2020 11:07:37 +0000 (13:07 +0200)
This bug was exposed by a previous removal of quoting around lambda
expressions in autoinsert-tests.el (1ecd350f38ee), which caused some
of those tests to fail.

* lisp/autoinsert.el (auto-insert): Cope with lexical closures.

lisp/autoinsert.el

index 25961d41089793224919acbd75b5242ba4358337..4af3d631a2c712c5551298d3126ab38934ef1915 100644 (file)
@@ -396,7 +396,7 @@ Matches the visited file name against the elements of `auto-insert-alist'."
                     ;; which might ask the user for something
                     (switch-to-buffer (current-buffer))
                     (if (and (consp action)
-                             (not (eq (car action) 'lambda)))
+                             (not (functionp action)))
                         (skeleton-insert action)
                       (funcall action)))))
               (if (vectorp action)