emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/objed fc93d49 134/166: Improve error object when flymak


From: Clemens Radermacher
Subject: [elpa] externals/objed fc93d49 134/166: Improve error object when flymake is used
Date: Sun, 29 Dec 2019 08:21:15 -0500 (EST)

branch: externals/objed
commit fc93d4950cb82c7d0b5639f7ba7d49afd9dda73e
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Improve error object when flymake is used
---
 objed-objects.el | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/objed-objects.el b/objed-objects.el
index 5200488..e9ddb4f 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -2578,6 +2578,7 @@ non-nil the indentation block can contain empty lines."
 
 (defvar flycheck-mode)
 (defvar flymake-mode)
+(defvar flymake-wrap-around)
 (declare-function flycheck-overlays-at "ext:flycheck")
 (declare-function flycheck-next-error "ext:flycheck")
 (declare-function flycheck-previous-error "ext:flycheck")
@@ -2594,6 +2595,10 @@ non-nil the indentation block can contain empty lines."
         (flymake-mode
          (let ((ov (car (flymake--overlays :beg (point)))))
            (when ov
+             (run-at-time 0 nil
+                          #'message
+                          (funcall (overlay-get ov 'help-echo)
+                                   (selected-window) ov (point)))
              (cons (overlay-start ov)
                    (overlay-end ov)))))))
 
@@ -2602,14 +2607,16 @@ non-nil the indentation block can contain empty lines."
   (cond ((bound-and-true-p flycheck-mode)
          (flycheck-next-error))
         (flymake-mode
-         (flymake-goto-next-error))))
+         (let ((flymake-wrap-around nil))
+           (flymake-goto-next-error 1)))))
 
 (defun objed--previous-error ()
   "Goto previous linter error."
-  (cond (flycheck-mode
+  (cond ((bound-and-true-p flycheck-mode)
          (flycheck-previous-error))
         (flymake-mode
-         (flymake-goto-prev-error))))
+         (let ((flymake-wrap-around nil))
+           (flymake-goto-prev-error 1)))))
 
 
 (objed-define-object nil error



reply via email to

[Prev in Thread] Current Thread [Next in Thread]