branch: externals/matlab-mode
commit f0c83df7267232a796b4c0f5570e7a685698c4b9
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>
mlint.el: fix minor error in activing mlint
When matlab--get-mlint-exe is able to find mlint, don't prompt to configure
mlint program. Also, if
we have mlint-program, we need to set maltab-show-mlint-warnings to t when
manually invoking
mlint-minor-mode via M-x mlint-minor-mode
---
mlint.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mlint.el b/mlint.el
index 58f9c662a7..c1e26bfc73 100644
--- a/mlint.el
+++ b/mlint.el
@@ -856,11 +856,13 @@ With prefix ARG, turn mlint minor mode on iff ARG is
positive.
;; else use global mlint-program for all *.m files
(when (not mlint-program)
(setq mlint-program (matlab--get-mlint-exe))
- (when (y-or-n-p "No MLINT program available. Configure it? ")
+ (when (and (not mlint-program)
+ (y-or-n-p "No MLINT program available. Configure it? "))
(customize-variable 'mlint-programs))))
(if mlint-program
(progn
+ (setq matlab-show-mlint-warnings t)
(add-hook 'after-save-hook #'mlint-buffer nil t)
(mlint-buffer))
;; Remove the mlint menu. set mlint-minor-mode variable to nil, disable
mlint keybindings