Function: make-separator-line
make-separator-line is a byte-compiled function defined in
simple.el.gz.
Signature
(make-separator-line &optional LENGTH)
Documentation
Make a string appropriate for usage as a visual separator line.
This uses the separator-line face.
If LENGTH is nil, use the window width.
Probably introduced at or before Emacs version 28.1.
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun make-separator-line (&optional length)
"Make a string appropriate for usage as a visual separator line.
This uses the `separator-line' face.
If LENGTH is nil, use the window width."
(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")))