branch: externals/matlab-mode
commit 2e30a53e2acd4c84a75b5fb9c9d0cae51c912fb9
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>
matlab-ts-mode: updated to do item
---
matlab-ts-mode.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/matlab-ts-mode.el b/matlab-ts-mode.el
index 2d78729959..7ee7e38020 100644
--- a/matlab-ts-mode.el
+++ b/matlab-ts-mode.el
@@ -2039,10 +2039,13 @@
https://github.com/acristoffers/tree-sitter-matlab/issues/34"
(if (require 'flycheck nil 'noerror)
(let* ((mlint (matlab--get-mlint-exe)))
- (if (not mlint)
- ;; TODO - dislay when activating matlab-ts-mode?
- (message "mlint code analyzer not found, not activating flycheck for
MATLAB.
-To fix, place matlab on your system path or configure `matlab-shell-command'")
+ ;; If we have mlint, activate.
+ ;; We could display a message here or in matlab-ts-mode if we don't have
mlint, but
+ ;; this would be just noise and cause problems when running tests with
emacs -q.
+
+ ;; TODO - add to MATLAB a menu item to view mlint messages and issue
info if
+ ;; no flycheck or no mlint.
+ (when mlint
(flycheck-define-command-checker
'matlab
"MATLAB mlint code analyzer"
@@ -2057,10 +2060,7 @@ To fix, place matlab on your system path or configure
`matlab-shell-command'")
:modes '(matlab-ts-mode)
:predicate #'(lambda () (flycheck-buffer-saved-p)))
;; Register matlab-mlint with flycheck
- (add-to-list 'flycheck-checkers 'matlab-mlint)
- ))
- (message "matlab-ts-mode: no flycheck, unable to activate mlint - \
-to fix install https://www.flycheck.org"))
+ (add-to-list 'flycheck-checkers 'matlab-mlint)))
;;;###autoload
(define-derived-mode matlab-ts-mode prog-mode "MATLAB:ts"