[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/eldoc-async 7854138 2/5: Fix bug in Flymake's hook for eldoc-doc
From: |
João Távora |
Subject: |
scratch/eldoc-async 7854138 2/5: Fix bug in Flymake's hook for eldoc-documentation-functions |
Date: |
Sun, 14 Jun 2020 09:09:13 -0400 (EDT) |
branch: scratch/eldoc-async
commit 785413864257e50ee716b4c8f7aebc9616b46997
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Fix bug in Flymake's hook for eldoc-documentation-functions
Don't return non-nil when we know there's nothing to report on.
* lisp/progmodes/flymake.el (flymake-eldoc-function): Check diags
before calling report-doc.
---
lisp/progmodes/flymake.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 1d7a2ca..58e8d56 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1092,8 +1092,9 @@ START and STOP and LEN are as in
`after-change-functions'."
"Document diagnostics at point.
Intended for `eldoc-documentation-functions' (which see)."
(let ((diags (flymake-diagnostics (point))))
- (funcall report-doc
- (and diags (mapconcat #'flymake-diagnostic-text diags "\n")))))
+ (when diags
+ (funcall report-doc
+ (mapconcat #'flymake-diagnostic-text diags "\n")))))
(defun flymake-goto-next-error (&optional n filter interactive)
"Go to Nth next Flymake diagnostic that matches FILTER.