Skip to content

Commit

Permalink
feat: only report message if other backends aren't running
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbarclay committed Nov 4, 2024
1 parent 637ea9e commit bc4ad8a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions parinfer-rust-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -626,11 +626,16 @@ CHANGES."
(when (and (local-variable-if-set-p 'parinfer-rust--in-debug)
parinfer-rust--in-debug)
(parinfer-rust-debug "./parinfer-rust-debug.txt" options answer))
(setq parinfer-rust--errors (list parinfer-error))
(if parinfer-error
(setq parinfer-rust--error parinfer-error)
;; If we have an error and are not being reported by a backend, warn the user
(if (and parinfer-error
(not (and (boundp 'flycheck-mode)
(memq 'parinfer-rust flycheck--automatically-enabled-checkers)))
(not (and (boundp 'flymake-mode)
(memq 'parinfer-rust-flymake (flymake-reporting-backends)))))
(message "Problem on line %s: %s"
(plist-get parinfer-error :line_no)
(plist-get parinfer-error :message)) ;; TODO - Handler errors
(plist-get parinfer-error :message))
;; This stops Emacs from flickering when scrolling
(if (not (string-equal parinfer-rust--previous-buffer-text replacement-string))
(save-mark-and-excursion
Expand Down

0 comments on commit bc4ad8a

Please sign in to comment.