Skip to content

Instantly share code, notes, and snippets.

@larsen
Created January 30, 2018 16:24
Show Gist options
  • Select an option

  • Save larsen/81e784be810703c37ae0ce9ba985dd7f to your computer and use it in GitHub Desktop.

Select an option

Save larsen/81e784be810703c37ae0ce9ba985dd7f to your computer and use it in GitHub Desktop.
(defun increase-text-scale-in-buffer-group (major-mode-name)
"Increment text scale for all buffers matching a give major mode name"
(interactive
(list (intern (completing-read
"Select major mode from the list: "
(remove-duplicates (mapcar (lambda (b)
(buffer-local-value
'major-mode (get-buffer b)))
(buffer-list)))))))
(cl-loop for buffer in (buffer-list)
when (string= (buffer-local-value
'major-mode (get-buffer buffer))
major-mode-name)
do (with-current-buffer buffer
(text-scale-increase 1))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment