From: Lars Ingebrigtsen Date: Sat, 6 Nov 2021 02:31:51 +0000 (+0100) Subject: Use underline on non-graphical terminals in make-separator-line X-Git-Tag: emacs-29.0.90~3671^2~211 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5b630caebf3460676a26accf49f197b7cd538e8e;p=emacs.git Use underline on non-graphical terminals in make-separator-line * lisp/simple.el (separator-line): (make-separator-line): Use an underline on terminals (bug#32950). --- diff --git a/lisp/simple.el b/lisp/simple.el index 916c90d2b87..456844d08ec 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -710,9 +710,10 @@ When called from Lisp code, ARG may be a prefix string to copy." :height 0.1 :background "#505050") (((type graphic) (background light)) :height 0.1 :background "#a0a0a0") - (t :foreground "ForestGreen")) + (t + :foreground "ForestGreen" :underline t)) "Face for separator lines." - :version "28.1" + :version "29.1" :group 'text) (defun make-separator-line (&optional length) @@ -720,14 +721,10 @@ 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 (display-graphic-p) - (if length - (concat (propertize (make-string length ?\s) 'face 'separator-line) - "\n") - (propertize "\n" 'face '(:inherit separator-line :extend t))) - (concat (propertize (make-string (or length (1- (window-width))) ?-) - 'face 'separator-line) - "\n"))) + (if length + (concat (propertize (make-string length ?\s) 'face 'separator-line) + "\n") + (propertize "\n" 'face '(:inherit separator-line :extend t)))) (defun delete-indentation (&optional arg beg end) "Join this line to previous and fix up whitespace at join.