summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-11-06 03:31:51 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-11-06 03:31:51 +0100
commit5b630caebf3460676a26accf49f197b7cd538e8e (patch)
tree54bae92db44e13c1ef59aa0d93bc968372500a77 /lisp
parent58deb30fd0df5aeed3303b2dfd53be171fdd5f81 (diff)
downloademacs-5b630caebf3460676a26accf49f197b7cd538e8e.tar.gz
emacs-5b630caebf3460676a26accf49f197b7cd538e8e.tar.bz2
emacs-5b630caebf3460676a26accf49f197b7cd538e8e.zip
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).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el17
1 files changed, 7 insertions, 10 deletions
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.