回答:
テキストのスケーリングは、特定のバッファーのテキストを、バッファーが表示されているすべての場所でズームします。
あなたがしたいことは、特定のバッファのテキストを拡大縮小するだけでなく、特定のフレームをズームすることです。
コマンドzoom-in、zoom-outおよびzoom-in/out ライブラリのはzoom-frm.el、あなたが簡単かつ漸進これらのものの両方を行いましょう。
キーボードから、コマンドzoom-in/outはあなたが必要とするすべてです-の代わりとしてそれを使用してくださいtext-scale-adjust:
(define-key ctl-x-map [(control ?+)] 'zoom-in/out)
(define-key ctl-x-map [(control ?-)] 'zoom-in/out)
(define-key ctl-x-map [(control ?=)] 'zoom-in/out)
(define-key ctl-x-map [(control ?0)] 'zoom-in/out)
あなたはマウスホイールの回転にバインドしてzoom-inそれzoom-outにすることができます:
(global-set-key (vector (list 'control mouse-wheel-down-event)) 'zoom-in)
(global-set-key (vector (list 'control mouse-wheel-up-event)) 'zoom-out)
マウスクリックによるズームのために、これらもバインドします。
(global-set-key [S-mouse-1] 'zoom-in)
(global-set-key [C-S-mouse-1] 'zoom-out)
;; Get rid of `mouse-set-font' or `mouse-appearance-menu':
(global-set-key [S-down-mouse-1] nil)
zoom-frm.elコマンドは次のように振る舞うことができるtext-scale-adjust(;そのモードラインと、そのスクロールバー、等ミニバッファを含むそのすべてのウィンドウ、)それが表示されている、またはそれらが全体の単一のフレームをズームすることができますどこバッファズーム、。
ヒットC-uの任意の時点でこれらのコマンドを使用しながらズーミングバッファとフレームズームを切り替えます。デフォルトで取得するズームの種類(バッファまたはフレーム)は、オプションで定義されますzoom-frame/buffer。C-uズームコマンドを使用すると、オプションが切り替わります。
デフォルトのC-x C-0/-/=バインディングは、フォントのサイズ変更に最適です。ただし、これらは使用されるバッファーにのみ適用されます。モードライン、ミニバッファー、その他のバッファーなど、バッファーの外側のテキストのフォントサイズは変更されません。
以下の関数は、これらの領域のフォントサイズもグローバルに変更します。
このdefault-font-size-pt変数を使用して、各emacsセッションのデフォルトのフォントサイズを設定できます。
(setq default-font-size-pt 12)
(defun modi/font-size-adj (&optional arg)
"The default C-x C-0/-/= bindings do an excellent job of font resizing.
They, though, do not change the font sizes for the text outside the buffer,
example in mode-line. Below function changes the font size in those areas too.
M-<NUM> M-x modi/font-size-adj increases font size by NUM points if NUM is +ve,
decreases font size by NUM points if NUM is -ve
resets font size if NUM is 0."
(interactive "p")
(if (= arg 0)
(setq font-size-pt default-font-size-pt)
(setq font-size-pt (+ font-size-pt arg)))
;; The internal font size value is 10x the font size in points unit.
;; So a 10pt font size is equal to 100 in internal font size value.
(set-face-attribute 'default nil :height (* font-size-pt 10)))
(defun modi/font-size-incr () (interactive) (modi/font-size-adj +1))
(defun modi/font-size-decr () (interactive) (modi/font-size-adj -1))
(defun modi/font-size-reset () (interactive) (modi/font-size-adj 0))
(modi/font-size-reset) ; Initialize font-size-pt var to the default value
フォントの調整はhydraパッケージの助けを借りて簡単に行うことができます。
(require 'hydra)
(defhydra hydra-font-resize
(global-map "C-M-=")
"font-resize"
("-" modi/font-size-decr "Decrease")
("=" modi/font-size-incr "Increase")
("0" modi/font-size-reset "Reset to default size"))
使用例:
C-M-= = = = =C-M-= - - - - - - C-M-= 0C-M-= = = = - - = = - - 0 - - = =C-M-=接頭辞を自由に変更してください。