From: Lars Ingebrigtsen Date: Sat, 6 Nov 2021 17:51:49 +0000 (+0100) Subject: Partially revert previous make-separator-line change X-Git-Tag: emacs-29.0.90~3671^2~186 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f921f189ee3d77715247bc81a723c09408971cc4;p=emacs.git Partially revert previous make-separator-line change * lisp/simple.el (make-separator-line): Use dashes on displays that don't support underlines (bug#32950). --- 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.