mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
(py-pychecker-run): Fix calculation of last command to include the
filename of the current buffer.
This commit is contained in:
parent
56835dd961
commit
7f232121c9
1 changed files with 8 additions and 3 deletions
|
@ -2770,12 +2770,17 @@ A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores."
|
|||
(let ((default
|
||||
(format "%s %s %s" py-pychecker-command
|
||||
(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
|
||||
(read-shell-command "Run pychecker like this: "
|
||||
(if py-pychecker-history
|
||||
(car py-pychecker-history)
|
||||
(if last
|
||||
last
|
||||
default)
|
||||
'py-pychecker-history))))
|
||||
(save-some-buffers (not py-ask-about-save) nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue