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

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

[elpa] externals/flymake-proselint 2bde20b: Adapt check following exampl


From: ELPA Syncer
Subject: [elpa] externals/flymake-proselint 2bde20b: Adapt check following example on the manual
Date: Tue, 26 Oct 2021 01:57:23 -0400 (EDT)

branch: externals/flymake-proselint
commit 2bde20b6ea58c58578a7a7a465f5515be9a76233
Author: Manuel Uberti <manuel.uberti@inventati.org>
Commit: Manuel Uberti <manuel.uberti@inventati.org>

    Adapt check following example on the manual
    
    See: 
https://github.com/emacs-mirror/emacs/commit/f5b4bb4a6fa3adcb653cab5dc760745b896320bb
---
 flymake-proselint.el | 51 +++++++++++++++++++++++++--------------------------
 1 file changed, 25 insertions(+), 26 deletions(-)

diff --git a/flymake-proselint.el b/flymake-proselint.el
index 91fef16..97fb5d9 100644
--- a/flymake-proselint.el
+++ b/flymake-proselint.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2021  Free Software Foundation, Inc.
 ;;
 ;; Author: Manuel Uberti <manuel.uberti@inventati.org>
-;; Version: 0.2.2
+;; Version: 0.2.3
 ;; Keywords: convenience
 ;; Package-Requires: ((emacs "26.1"))
 ;; URL: https://github.com/manuel-uberti/flymake-proselint
@@ -51,31 +51,30 @@
         :command '("proselint" "-")
         :sentinel
         (lambda (proc _event)
-          (let ((status (process-status proc)))
-            (when (or (eq status 'exit) (eq status 'signal))
-              (unwind-protect
-                  (if (with-current-buffer source (eq proc 
flymake-proselint--flymake-proc))
-                      (with-current-buffer (process-buffer proc)
-                        (goto-char (point-min))
-                        (cl-loop
-                         while (search-forward-regexp
-                                "^.+:\\([[:digit:]]+\\):\\([[:digit:]]+\\): 
\\(.+\\)$"
-                                nil t)
-                         for msg = (match-string 3)
-                         for (beg . end) = (flymake-diag-region
-                                            source
-                                            (string-to-number (match-string 1))
-                                            (string-to-number (match-string 
2)))
-                         collect (flymake-make-diagnostic source
-                                                          beg
-                                                          end
-                                                          :warning
-                                                          msg)
-                         into diags
-                         finally (funcall report-fn diags)))
-                    (flymake-log :warning "Canceling obsolete check %s"
-                                 proc))
-                (kill-buffer (process-buffer proc))))))))
+          (when (memq (process-status proc) '(exit signal))
+            (unwind-protect
+                (if (with-current-buffer source (eq proc 
flymake-proselint--flymake-proc))
+                    (with-current-buffer (process-buffer proc)
+                      (goto-char (point-min))
+                      (cl-loop
+                       while (search-forward-regexp
+                              "^.+:\\([[:digit:]]+\\):\\([[:digit:]]+\\): 
\\(.+\\)$"
+                              nil t)
+                       for msg = (match-string 3)
+                       for (beg . end) = (flymake-diag-region
+                                          source
+                                          (string-to-number (match-string 1))
+                                          (string-to-number (match-string 2)))
+                       collect (flymake-make-diagnostic source
+                                                        beg
+                                                        end
+                                                        :warning
+                                                        msg)
+                       into diags
+                       finally (funcall report-fn diags)))
+                  (flymake-log :warning "Canceling obsolete check %s"
+                               proc))
+              (kill-buffer (process-buffer proc)))))))
       (process-send-region flymake-proselint--flymake-proc (point-min) 
(point-max))
       (process-send-eof flymake-proselint--flymake-proc))))
 



reply via email to

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