From ccfaf3f464f180b8b20d8732ec477dc043dfc21c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jul 2020 18:26:33 -0400 Subject: [PATCH] Move auto-mode-alist fallbacks to bottom So they don't override auto-mode-alist entries added by packages, like direnv's .envrc entry. --- core/core-editor.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 53ffb9ae4..f0106dea8 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -172,10 +172,12 @@ possible." ;; ;;; Extra file extensions to support -(push '("/LICENSE\\'" . text-mode) auto-mode-alist) -(push '("\\.log\\'" . text-mode) auto-mode-alist) -(push '("rc\\'" . conf-mode) auto-mode-alist) -(push '("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode) auto-mode-alist) +(nconc + auto-mode-alist + '(("/LICENSE\\'" . text-mode) + ("\\.log\\'" . text-mode) + ("rc\\'" . conf-mode) + ("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode))) ;;