Commit 7f232121 authored by Barry Warsaw's avatar Barry Warsaw

(py-pychecker-run): Fix calculation of last command to include the

filename of the current buffer.
parent 56835dd9
...@@ -2770,12 +2770,17 @@ A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores." ...@@ -2770,12 +2770,17 @@ A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores."
(let ((default (let ((default
(format "%s %s %s" py-pychecker-command (format "%s %s %s" py-pychecker-command
(mapconcat 'identity py-pychecker-command-args " ") (mapconcat 'identity py-pychecker-command-args " ")
(buffer-file-name)))) (buffer-file-name)))
(last (when py-pychecker-history
(let* ((lastcmd (car py-pychecker-history))
(cmd (cdr (reverse (split-string lastcmd))))
(newcmd (reverse (cons (buffer-file-name) cmd))))
(mapconcat 'identity newcmd " ")))))
(list (list
(read-shell-command "Run pychecker like this: " (read-shell-command "Run pychecker like this: "
(if py-pychecker-history (if last
(car py-pychecker-history) last
default) default)
'py-pychecker-history)))) 'py-pychecker-history))))
(save-some-buffers (not py-ask-about-save) nil) (save-some-buffers (not py-ask-about-save) nil)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment