From f921f189ee3d77715247bc81a723c09408971cc4 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 6 Nov 2021 18:51:49 +0100 Subject: [PATCH] Partially revert previous make-separator-line change * lisp/simple.el (make-separator-line): Use dashes on displays that don't support underlines (bug#32950). --- lisp/simple.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 456844d08ec..82e373be9e6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -721,10 +721,16 @@ When called from Lisp code, ARG may be a prefix string to copy." This uses the `separator-line' face. If LENGTH is nil, use the window width." - (if length - (concat (propertize (make-string length ?\s) 'face 'separator-line) - "\n") - (propertize "\n" 'face '(:inherit separator-line :extend t)))) + (if (or (display-graphic-p) + (display-supports-face-attributes-p '(:underline t))) + (if length + (concat (propertize (make-string length ?\s) 'face 'separator-line) + "\n") + (propertize "\n" 'face '(:inherit separator-line :extend t))) + ;; In terminals (that don't support underline), use a line of dashes. + (concat (propertize (make-string (or length (1- (window-width))) ?-) + 'face 'separator-line) + "\n"))) (defun delete-indentation (&optional arg beg end) "Join this line to previous and fix up whitespace at join. -- 2.39.2