From 6e84ab0673aec1b175656c8611b760ffab46665c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 00:37:19 -0500 Subject: [PATCH] Fix doom-init-menu-bar-in-gui-frames-h #2156 window-setup-hook doesn't pass an argument. --- core/core-ui.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 3670c490d..ea9bcdbf5 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -305,10 +305,11 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; there, but we still want it disabled in terminal frames because there ;; it activates an ugly menu bar. (add-hook! '(window-setup-hook after-make-frame-functions) - (defun doom-init-menu-bar-in-gui-frames-h (frame) + (defun doom-init-menu-bar-in-gui-frames-h (&optional frame) "Re-enable menu-bar-lines in GUI frames." - (when (display-graphic-p frame) - (set-frame-parameter frame 'menu-bar-lines 1))))) + (when-let (frame (or frame (selected-frame))) + (when (display-graphic-p frame) + (set-frame-parameter frame 'menu-bar-lines 1)))))) ;; The native border "consumes" a pixel of the fringe on righter-most splits, ;; `window-divider' does not. Available since Emacs 25.1.