From 6336c18e5c9270d745e42b516c35ef0816f67f9b Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 19 Jul 2021 16:13:57 +0200 Subject: [PATCH] Use make-separator-line in shortdoc * lisp/simple.el (separator-line): Tweak definition to not be so overwhelming. * lisp/emacs-lisp/shortdoc.el (shortdoc-separator): Removed. (shortdoc-display-group): Use make-separator-line. --- lisp/emacs-lisp/shortdoc.el | 10 +--------- lisp/simple.el | 5 ++++- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 4beba1dbed1..22439f4c36c 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -32,14 +32,6 @@ "Short documentation." :group 'lisp) -(defface shortdoc-separator - '((((class color) (background dark)) - :height 0.1 :background "#505050" :extend t) - (((class color) (background light)) - :height 0.1 :background "#a0a0a0" :extend t) - (t :height 0.1 :inverse-video t :extend t)) - "Face used to separate sections.") - (defface shortdoc-heading '((t :inherit variable-pitch :height 1.3 :weight bold)) "Face used for a heading." @@ -1174,7 +1166,7 @@ If FUNCTION is non-nil, place point on the entry for FUNCTION (if any)." ;; There may be functions not yet defined in the data. ((fboundp (car data)) (when prev - (insert (propertize "\n" 'face 'shortdoc-separator))) + (insert (make-separator-line))) (setq prev t) (shortdoc--display-function data)))) (cdr (assq group shortdoc--groups)))) diff --git a/lisp/simple.el b/lisp/simple.el index ea3ccb388e5..5741c24eb7b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -696,7 +696,10 @@ When called from Lisp code, ARG may be a prefix string to copy." (goto-char pos))) (defface separator-line - '((((type graphic)) :height 0.1 :inverse-video t) + '((((type graphic) (background dark)) + :height 0.1 :background "#505050") + (((type graphic) (background light)) + :height 0.1 :background "#a0a0a0") (t :foreground "ForestGreen")) "Face for separator lines." :version "28.1" -- 2.39.2