From: Lars Ingebrigtsen Date: Mon, 24 Jan 2022 14:05:28 +0000 (+0100) Subject: Make anonymous functions work in auto-mode-alist X-Git-Tag: emacs-29.0.90~2791 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ffb0e8c4eff43a31bfb95eaf8b9db9d3c400e5ae;p=emacs.git Make anonymous functions work in auto-mode-alist * lisp/files.el (set-auto-mode--apply-alist): Don't infloop on anonymous functions in auto-mode-alist (bug#20709). --- diff --git a/lisp/files.el b/lisp/files.el index e021545cf14..aabe8f445e0 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3249,6 +3249,7 @@ extra checks should be done." (let ((case-fold-search t)) (assoc-default name alist 'string-match)))))) (if (and mode + (not (functionp mode)) (consp mode) (cadr mode)) (setq mode (car mode)