From bd58c34c023605240f040403cdf2761c844165ea Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 May 2016 00:14:07 -0400 Subject: [PATCH] Generate scratch buffer properly in terminal emacs --- core/core.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core.el b/core/core.el index 3ee0c20dc..ea09f1121 100644 --- a/core/core.el +++ b/core/core.el @@ -217,7 +217,8 @@ enable multiple minor modes for the same regexp.") (doom-mode) (erase-buffer) (insert - (let* ((width (- (if auto-detect-frame (window-width) (cdr (assq 'width default-frame-alist))) 3)) + (let* ((auto-detect-frame (or auto-detect-frame (not (display-graphic-p)))) + (width (- (if auto-detect-frame (window-width) (cdr (assq 'width default-frame-alist))) 3)) (lead (make-string (truncate (/ (- width 78) 2)) ? ))) (concat (propertize