Skip to content

Commit

Permalink
Show some message when there's no doc to display at point
Browse files Browse the repository at this point in the history
  • Loading branch information
casouri committed Jun 1, 2024
1 parent 7892a46 commit 7b91469
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions eldoc-box.el
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ For DOCS, see ‘eldoc-display-functions’."
"Display documentation of the symbol at point."
(interactive)
(when (boundp 'eldoc--doc-buffer)
(unless (memq #'eldoc-box--help-at-point-async-update
eldoc-display-functions)
(add-hook 'eldoc-display-functions
#'eldoc-box--help-at-point-async-update 0 t))
(add-hook 'eldoc-display-functions
#'eldoc-box--help-at-point-async-update 0 t)
(let ((eldoc-box-position-function
eldoc-box-at-point-position-function))
eldoc-box-at-point-position-function)
(doc (with-current-buffer eldoc--doc-buffer
(buffer-string))))
(eldoc-box--display
(with-current-buffer eldoc--doc-buffer
(buffer-string))))
(if (equal doc "")
"There’s no doc to display at this point" doc)))
(setq eldoc-box--help-at-point-last-point (point))
(run-with-timer 0.1 nil #'eldoc-box--help-at-point-cleanup)
(when eldoc-box-clear-with-C-g
Expand Down

0 comments on commit 7b91469

Please sign in to comment.