Posted on 28-10-2008
Filed Under (技术) by waterlin

只要把下面这段代码放到.emacs里,即可像Firefox一样,用”C-+“和”C–“来放大Emacs显示字体的大小,非常地方便。

(defun increase-font-size ()
(interactive)
(set-face-attribute ‘default
nil
:height
(ceiling (* 1.10
(face-attribute ‘default :height)))))
(defun decrease-font-size ()
(interactive)
(set-face-attribute ‘default
nil
:height
(floor (* 0.9
(face-attribute ‘default :height)))))
(global-set-key (kbd “C-+”) ‘increase-font-size)
(global-set-key (kbd “C–“) ‘decrease-font-size)

本代码摘自:http://sachachua.com/wp/2006/09/15/emacs-changing-the-font-size-on-the-fly/

© 2008, 浏忙大爆炸. All rights reserved.
除非注明,浏忙大爆炸文章均为原创,转载请以链接形式标明本文地址。

Post a Comment
Name:
Email:
Website:
Comments: