summaryrefslogtreecommitdiff
path: root/lisp/km-framewin.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-10-27 22:39:38 -0400
committerKyle Meyer <kyle@kyleam.com>2016-10-27 22:39:38 -0400
commit186e5674436d6379c70f57ed3543274d3381c2fb (patch)
treee5ce365b3b770d294207c0a6506f47a51543e340 /lisp/km-framewin.el
parent88786a98d9d9ad5330b166831ce44125fadd1061 (diff)
downloademacs.d-186e5674436d6379c70f57ed3543274d3381c2fb.tar.gz
Add change-font-height-global command
Diffstat (limited to 'lisp/km-framewin.el')
-rw-r--r--lisp/km-framewin.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/km-framewin.el b/lisp/km-framewin.el
index a81f464..3d7bc83 100644
--- a/lisp/km-framewin.el
+++ b/lisp/km-framewin.el
@@ -61,5 +61,22 @@ Assumes that the window is only split into two."
(split-window-vertically))
(switch-to-buffer nil)))
+(defvar km/default-font-height nil)
+
+;;;###autoload
+(defun km/change-font-height-global (height &optional this-frame)
+ (interactive
+ (let ((cur-height (face-attribute 'default :height)))
+ (unless km/default-font-height
+ (setq km/default-font-height (face-attribute 'default :height)))
+ (list (read-number (format "Current height is %s. New value: " cur-height)
+ (if (= cur-height km/default-font-height)
+ (round (* 1.15 cur-height))
+ km/default-font-height))
+ current-prefix-arg)))
+ (set-face-attribute 'default
+ (and this-frame (window-frame))
+ :height height))
+
(provide 'km-framewin)
;;; km-framewin.el ends here