From 6c65e9fa00e93896778dfbd79c70c150055754d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 5 Apr 2024 12:03:54 -0400 Subject: [PATCH] refactor: remove redundant auto-mode-alist entries Also removes the *.{hex,nes} entry because it's far too niche to be a global default. --- lisp/doom-editor.el | 3 +-- lisp/doom-start.el | 10 ++-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/lisp/doom-editor.el b/lisp/doom-editor.el index 2df2cbb66..80696ac35 100644 --- a/lisp/doom-editor.el +++ b/lisp/doom-editor.el @@ -250,8 +250,7 @@ tell you about it. Very annoying. This prevents that." auto-mode-alist '(("/LICENSE\\'" . text-mode) ("\\.log\\'" . text-mode) - ("rc\\'" . conf-mode) - ("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode))) + ("rc\\'" . conf-mode))) ;; diff --git a/lisp/doom-start.el b/lisp/doom-start.el index c5b1d46b2..ce022d7cd 100644 --- a/lisp/doom-start.el +++ b/lisp/doom-start.el @@ -143,14 +143,8 @@ (setq selection-coding-system 'utf-8)) -;;; Support for more file extensions -;; Add support for additional file extensions. -(dolist (entry '(("/\\.doom\\(?:rc\\|project\\|module\\|profile\\)\\'" . emacs-lisp-mode) - ("/LICENSE\\'" . text-mode) - ("\\.log\\'" . text-mode) - ("rc\\'" . conf-mode) - ("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode))) - (push entry auto-mode-alist)) +;;; Support for Doom-specific file extensions +(add-to-list 'auto-mode-alist '("/\\.doom\\(?:rc\\|project\\|module\\|profile\\)\\'" . emacs-lisp-mode)) ;;