From 3766dd502c55e609f67fbbe362dbb60e786b40b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Tue, 17 Dec 2019 23:47:14 +0100 Subject: [PATCH] rust: defer loading thanks to removing rust-mode from auto-mode-alist --- init.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index ffabb1d..c5f9741 100644 --- a/init.el +++ b/init.el @@ -753,7 +753,9 @@ inserted between the braces between the braces." (use-package rustic :if (>= emacs-major-version 26) - :demand ; to use rustic-mode even if rust-mode also installed + :init + ;; to use rustic-mode even if rust-mode also installed + (setq auto-mode-alist (delete '("\\.rs\\'" . rust-mode) auto-mode-alist)) :hook (rustic-mode . my-rustic-mode-hook-fn)) ;;; But if you have Emacs older than 26 than you should install