GNU bug report logs -
#48307
Feature request: provide default keybindings to change the font size in all windows
Previous Next
Full log
View this message in rfc822 format
On 5/9/21 4:16 PM, Gregory Heytings wrote:
>> Not all the implementations are good, and it would be very nice if such a feature were available out of the box.
>>
>
> Would the following do what you want?
>
> (defun global-text-scale-adjust-do (increment)
> (set-face-attribute 'default nil :height
> (+ (face-attribute 'default :height) increment))
> (message "Use + and - for further adjustment")
> (set-transient-map
> (let ((map (make-sparse-keymap)))
> (define-key map (kbd "+") 'global-text-scale-adjust-increase)
> (define-key map (kbd "-") 'global-text-scale-adjust-decrease)
> map)))
> (defun global-text-scale-adjust-increase ()
> (interactive)
> (global-text-scale-adjust-do +5))
> (defun global-text-scale-adjust-decrease ()
> (interactive)
> (global-text-scale-adjust-do -5))
> (global-set-key (kbd "C-x M-+") 'global-text-scale-adjust-increase)
> (global-set-key (kbd "C-x M--") 'global-text-scale-adjust-decrease)
Yup, probably. The performance isn't great, but that's more or less what I have in my .emacs.
This bug report was last modified 2 years and 327 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.