branch: elpa/eldoc-mouse
commit f277f7ca4d841c9f62cf1c66910c35131481c5cc
Author: HuangFeiyu <[email protected]>
Commit: HuangFeiyu <[email protected]>

     add code comment
---
 eldoc-mouse.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eldoc-mouse.el b/eldoc-mouse.el
index 162a7687eb3..f244ea1f7b0 100644
--- a/eldoc-mouse.el
+++ b/eldoc-mouse.el
@@ -112,6 +112,9 @@ POS is the buffer position under the mouse cursor."
       (add-hook 'eldoc-documentation-functions 
#'eldoc-mouse-hover-eldoc-function nil t)
       (goto-char pos)
       (setq-local eldoc-mouse-last-symbol-bounds (bounds-of-thing-at-point 
'symbol))
+      ;; use (nth 4 (syntax-ppss)) to check if the mouse is overing code 
comment.
+      ;; based on the answer from
+      ;; 
https://emacs.stackexchange.com/questions/14269/how-to-detect-if-the-point-is-within-a-comment-area/14270#14270
       (when (and (not (eolp)) (not (nth 4 (syntax-ppss))) (thing-at-point 
'symbol))
         (setq-local eldoc-mouse-unsupress-posframe t)
         (eldoc-print-current-symbol-info)

Reply via email to