[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat e17494297d 1/2: Improve make-separator-line agai
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat e17494297d 1/2: Improve make-separator-line again |
Date: |
Fri, 7 Apr 2023 09:57:42 -0400 (EDT) |
branch: externals/compat
commit e17494297dc11fe1dff893156b62586c103bc4b8
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Improve make-separator-line again
On graphic display use a string of spaces with :underline=t if length is
non-nil, otherwise use only a newline :extend=t. On terminal displays use
dashes.
---
compat-28.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/compat-28.el b/compat-28.el
index cfbf48b4b1..620a799564 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -221,10 +221,10 @@ and BLUE, is normalized to have its value in [0,65535]."
(compat-defun make-separator-line (&optional length) ;;
<compat-tests:make-separator-line>
"Make a string appropriate for usage as a visual separator line.
If LENGTH is nil, use the window width."
- ;; :extend is only supported on Emacs 27 and newer
- (if (and (eval-when-compile (> emacs-major-version 26))
- (not length) (display-graphic-p))
- (propertize "\n" 'face '(:extend t :height 0.1 :inverse-video t))
+ (if (display-graphic-p)
+ (if length
+ (concat (propertize (make-string length ?\s) 'face '(:underline t))
"\n")
+ (propertize "\n" 'face '(:extend t :height 0.1 :inverse-video t)))
(concat (make-string (or length (1- (window-width))) ?-) "\n")))
;;;; Defined in subr.el