From d5a1701a75d7068d51835aab2f15153b9b989199 Mon Sep 17 00:00:00 2001 From: Mathieu Marques Date: Fri, 12 Mar 2021 19:45:18 +0100 Subject: [PATCH] Make ElDoc separator customizable * lisp/emacs-lisp/eldoc.el (eldoc-documentation-separator): New user option (bug#47109). (eldoc-documentation-separator): New face. (eldoc--format-doc-buffer): Use them as a custom separator. --- lisp/emacs-lisp/eldoc.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 485ea26379..81fb205610 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -129,6 +129,16 @@ window. If the value is the symbol `maybe', then the echo area is only skipped if the documentation doesn't fit there." :type 'boolean) +(defcustom eldoc-documentation-separator "" + "Separator to use between each documentation thing, when multiple." + :type 'string + :version "28.1") + +(defface eldoc-documentation-separator + `((t :inherit shadow ,@(and (>= emacs-major-version 27) '(:extend t)))) + "Face to use for the separator between documentation things." + :version "28.1") + (defface eldoc-highlight-function-argument '((t (:inherit bold))) "Face used for the argument at point in a function's argument list. @@ -490,7 +500,11 @@ This holds the results of the last documentation request." ": " this-doc)) do (insert this-doc) - when rest do (insert "\n") + when rest + do (insert (concat + "\n" + (propertize eldoc-documentation-separator + 'face 'eldoc-documentation-separator))) finally (goto-char (point-min))) ;; Rename the buffer, taking into account whether it was ;; hidden or not -- 2.30.1