From e79b4ccd7948108a29a8a3d84489e47c376c95db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Fri, 24 Mar 2023 17:37:01 +0000 Subject: [PATCH] Allow users to customize eldoc buffer separator (bug#62029) * lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer-separator): New variable. (eldoc--format-doc-buffer): Use it. --- lisp/emacs-lisp/eldoc.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index ccc466cfd44..43e768054a7 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -499,6 +499,10 @@ If INTERACTIVE, display it. Else, return said buffer." (display-buffer (current-buffer))) (t (current-buffer))))) +(defvar eldoc-doc-buffer-separator + "String used to separate items in Eldoc documentation buffer." + (concat "\n" (propertize "\n" 'face '(:inherit separator-line :extend t)) "\n")) + (defun eldoc--format-doc-buffer (docs) "Ensure DOCS are displayed in an *eldoc* buffer." (with-current-buffer (if (buffer-live-p eldoc--doc-buffer) @@ -522,7 +526,8 @@ If INTERACTIVE, display it. Else, return said buffer." ": " this-doc)) do (insert this-doc) - when rest do (insert "\n") + when rest do + (insert eldoc-doc-buffer-separator) finally (goto-char (point-min))) ;; Rename the buffer, taking into account whether it was ;; hidden or not -- 2.39.2