Created
November 1, 2016 21:07
-
-
Save ustun/f5b5eb447c0e7a02ef67a90324bd8f28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun save-text-scale () | |
"Save text-scale." | |
(message "saving prev text scale %d" text-scale-mode-amount) | |
(setq text-scale-previous (buffer-local-value 'text-scale-mode-amount (current-buffer)))) | |
(add-hook 'before-revert-hook 'save-text-scale) | |
(defun restore-text-scale () | |
"Restore text-scale." | |
(message "restoring prev text scale %d" text-scale-previous) | |
(text-scale-increase text-scale-previous)) | |
(add-hook 'after-revert-hook 'restore-text-scale) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment