mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08:00
fix(:editor): persist text scale after mode guess
When a buffer is in fundamental mode saving the buffer should not rescale the text to default. Fix: #7378
This commit is contained in:
parent
ba1dca322f
commit
d3920cf0b6
1 changed files with 9 additions and 0 deletions
|
|
@ -136,6 +136,15 @@ or file path may exist now."
|
|||
(set-auto-mode)
|
||||
(not (eq major-mode 'fundamental-mode)))))))
|
||||
|
||||
(defadvice! doom--preserve-text-scale-for-guess-mode-a (fn)
|
||||
"Preserve the text scale for `set-auto-mode'.
|
||||
When a file is saved in `fundamental-mode' the text scale should be preserved.
|
||||
This helps with that."
|
||||
:around #'set-auto-mode
|
||||
(let ((scale text-scale-mode-amount))
|
||||
(funcall fn)
|
||||
(text-scale-set scale)))
|
||||
|
||||
(defadvice! doom--shut-up-autosave-a (fn &rest args)
|
||||
"If a file has autosaved data, `after-find-file' will pause for 1 second to
|
||||
tell you about it. Very annoying. This prevents that."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue