diff --git a/core/prelude-editor.el b/core/prelude-editor.el index 6db7677..4d50c27 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -183,6 +183,8 @@ The body of the advice is in BODY." "Set buffer major mode according to `auto-mode-alist'." (let* ((name (buffer-name buffer)) (mode (assoc-default name auto-mode-alist 'string-match))) + (when (and mode (consp mode)) + (setq mode (car mode))) (with-current-buffer buffer (if mode (funcall mode))))) ;; highlight the current line