refactor: doom-guess-mode-h: return non-nil on success

This commit is contained in:
Henrik Lissner 2023-09-12 18:56:29 +02:00
parent f26b038ec3
commit 7bdf7cf7c0
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -130,7 +130,8 @@ or file path may exist now."
(let ((buffer (or (buffer-base-buffer) (current-buffer)))) (let ((buffer (or (buffer-base-buffer) (current-buffer))))
(and (buffer-file-name buffer) (and (buffer-file-name buffer)
(eq buffer (window-buffer (selected-window))) ; only visible buffers (eq buffer (window-buffer (selected-window))) ; only visible buffers
(set-auto-mode)))))) (set-auto-mode)
(not (eq major-mode 'fundamental-mode)))))))
(defadvice! doom--shut-up-autosave-a (fn &rest args) (defadvice! doom--shut-up-autosave-a (fn &rest args)
"If a file has autosaved data, `after-find-file' will pause for 1 second to "If a file has autosaved data, `after-find-file' will pause for 1 second to