aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2023-03-24 17:37:01 +0000
committerJoão Távora2023-03-24 17:37:42 +0000
commite79b4ccd7948108a29a8a3d84489e47c376c95db (patch)
treef1cc70958e4175150aebaebb2b835301b28d5d54
parenta384401eab59fbc3e551211c4ebf342c73957409 (diff)
downloademacs-e79b4ccd7948108a29a8a3d84489e47c376c95db.tar.gz
emacs-e79b4ccd7948108a29a8a3d84489e47c376c95db.zip
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.
-rw-r--r--lisp/emacs-lisp/eldoc.el7
1 files changed, 6 insertions, 1 deletions
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."
499 (display-buffer (current-buffer))) 499 (display-buffer (current-buffer)))
500 (t (current-buffer))))) 500 (t (current-buffer)))))
501 501
502(defvar eldoc-doc-buffer-separator
503 "String used to separate items in Eldoc documentation buffer."
504 (concat "\n" (propertize "\n" 'face '(:inherit separator-line :extend t)) "\n"))
505
502(defun eldoc--format-doc-buffer (docs) 506(defun eldoc--format-doc-buffer (docs)
503 "Ensure DOCS are displayed in an *eldoc* buffer." 507 "Ensure DOCS are displayed in an *eldoc* buffer."
504 (with-current-buffer (if (buffer-live-p eldoc--doc-buffer) 508 (with-current-buffer (if (buffer-live-p eldoc--doc-buffer)
@@ -522,7 +526,8 @@ If INTERACTIVE, display it. Else, return said buffer."
522 ": " 526 ": "
523 this-doc)) 527 this-doc))
524 do (insert this-doc) 528 do (insert this-doc)
525 when rest do (insert "\n") 529 when rest do
530 (insert eldoc-doc-buffer-separator)
526 finally (goto-char (point-min))) 531 finally (goto-char (point-min)))
527 ;; Rename the buffer, taking into account whether it was 532 ;; Rename the buffer, taking into account whether it was
528 ;; hidden or not 533 ;; hidden or not