]> err.no Git - dotfiles/commitdiff
Add support for resizing frame
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Tue, 10 Jun 2008 00:04:36 +0000 (00:04 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Tue, 10 Jun 2008 00:04:36 +0000 (00:04 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@1255 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

emacs

diff --git a/emacs b/emacs
index 59f977ede5e54b09dae23666fb6057e2a890518f..7e2a03a0f3074b4988cc908eee84dad0dbd7f0b8 100644 (file)
--- a/emacs
+++ b/emacs
   (setq gnus-home-directory "~/.emacs.d/gnus"
        gnus-init-file "~/.gnus"
        message-directory (concat gnus-home-directory "/Mail")))
+
+
+(cw/for-host "luxevop"
+  ;; Firefox-like zooming of fonts.
+  (setq tfheen-base-font "Bitstream Vera Sans Mono"
+       tfheen-base-size 12
+       tfheen-current-size tfheen-base-size)
+
+  (defun font-zoom-increase-font-size ()
+    (interactive)
+    (setq tfheen-current-size (+ tfheen-current-size 2))
+    (let ((font-name (format "%s-%d" tfheen-base-font tfheen-current-size)))
+      (set-frame-font font-name)))
+
+  (defun font-zoom-decrease-font-size ()
+    (interactive)
+    (setq tfheen-current-size (- tfheen-current-size 2))
+    (let ((font-name (format "%s-%d" tfheen-base-font tfheen-current-size)))
+      (set-frame-font font-name)))
+
+  (defun font-zoom-reset-font-size ()
+    (interactive)
+    (let ((font-name (format "%s-%d" tfheen-base-font tfheen-base-size)))
+      (set-frame-font font-name)))
+
+  (define-key global-map (read-kbd-macro "C--") 'font-zoom-decrease-font-size)
+  (define-key global-map (read-kbd-macro "C-+") 'font-zoom-increase-font-size)
+  (define-key global-map (read-kbd-macro "C-=") 'font-zoom-reset-font-size)
+  (font-zoom-reset-font-size))