(mlint-run): Fix case where mlint-program was buffer local.

This commit is contained in:
zappo 2010-07-29 15:13:13 +00:00
parent dbacb80c1a
commit b2c6eafdf3

View file

@ -163,6 +163,7 @@ Argument STRING is the text to interpret."
If BUFFER is nil, use the current buffer."
(when (and (file-exists-p (buffer-file-name)) mlint-program)
(let* ((fn (buffer-file-name (current-buffer)))
(buffer-mlint-program mlint-program)
(dd default-directory)
(show-mlint-warnings matlab-show-mlint-warnings)
(highlight-cross-function-variables
@ -186,7 +187,7 @@ If BUFFER is nil, use the current buffer."
(erase-buffer)
(when mlint-verbose (message "Running mlint..."))
(apply 'call-process mlint-program nil (current-buffer) nil
(apply 'call-process buffer-mlint-program nil (current-buffer) nil
(append flags (list fn)))
(when mlint-verbose (message "Running mlint...done"))