From 3f5feb3c7f07a31f7c30fdbf9da176af09f29b08 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Sat, 22 Dec 2018 14:09:02 +0800 Subject: [PATCH] Fix: function definition is void: font-info. --- doom-modeline.el | 4 +++- test/test-helper.el | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doom-modeline.el b/doom-modeline.el index bb31233..cf0db07 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -83,7 +83,9 @@ ;; (defvar doom-modeline-height (let ((font (face-font 'mode-line))) - (if font (* 2 (aref (font-info font) 2)) 25)) + (if (and font (fboundp 'font-info)) + (* 2 (aref (font-info font) 2)) + 25)) "How tall the mode-line should be (only respected in GUI Emacs).") (defvar doom-modeline-bar-width 3 diff --git a/test/test-helper.el b/test/test-helper.el index 586228f..a36041e 100644 --- a/test/test-helper.el +++ b/test/test-helper.el @@ -35,8 +35,6 @@ (set-text-properties 0 (length txt) nil txt) txt) -(defvar doom-modeline-height 26) - (require 'doom-modeline (expand-file-name "doom-modeline.el")) ;;; test-helper.el ends here