Guess major-mode when saving a fundamental-mode file
This commit is contained in:
parent
ace4c4c782
commit
ee5cdd13dd
1 changed files with 7 additions and 0 deletions
|
@ -77,6 +77,13 @@ possible."
|
|||
auto-save-list-file-name (concat doom-cache-dir "autosave")
|
||||
backup-directory-alist `(("." . ,(concat doom-cache-dir "backup/"))))
|
||||
|
||||
(add-hook! 'after-save-hook
|
||||
(defun doom-guess-mode-h ()
|
||||
"Guess mode when saving a file in `fundamental-mode'."
|
||||
(when (and (eq major-mode 'fundamental-mode)
|
||||
(buffer-file-name (buffer-base-buffer)))
|
||||
(set-auto-mode))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Formatting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue