From ffb0e8c4eff43a31bfb95eaf8b9db9d3c400e5ae Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 24 Jan 2022 15:05:28 +0100 Subject: [PATCH] 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). --- lisp/files.el | 1 + 1 file changed, 1 insertion(+) 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) -- 2.39.2