diff options
author | Eli Zaretskii <eliz@gnu.org> | 2020-04-18 12:01:26 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2020-04-18 12:01:26 +0300 |
commit | 175c61c18bfaa1d75aa087ba4bd4de3ebfe1a1d6 (patch) | |
tree | dfbb644b07477429f7958c7a8c01998aa6e68cf6 /test | |
parent | 6b297519b580df27d8721943f55629689b4c83e0 (diff) | |
download | emacs-175c61c18bfaa1d75aa087ba4bd4de3ebfe1a1d6.tar.gz |
Fix "C-u M-!" when 'shell-command-dont-erase-buffer' is non-nil
* lisp/simple.el (shell-command-dont-erase-buffer): Clarify the
effect of the various values in the doc string.
(shell-command-save-pos-or-erase, shell-command): Don't move or
push point if the output will go to the current buffer.
(Bug#40690)
(shell-command): Mention 'shell-command-dont-erase-buffer' in the
doc string.
* test/lisp/simple-tests.el
(with-shell-command-dont-erase-buffer): Don't is shell quoting
'like this', as it doesn't work on MS-Windows; quote "like this"
instead.
(simple-tests-shell-command-dont-erase-buffer): Adapt the test to
the new modus operandi.
* doc/emacs/misc.texi (Single Shell): Document the effect of the
various values of 'shell-command-dont-erase-buffer'.
* etc/NEWS: Expand and reword the entry regarding changes in
'shell-command-dont-erase-buffer'.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/simple-tests.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 276df795fca..8c477165a4f 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -724,7 +724,7 @@ See Bug#21722." (,output-buf (if ,output-buffer-is-current ,caller-buf (generate-new-buffer "output-buf"))) (emacs (expand-file-name invocation-name invocation-directory)) - (,command (format "%s -Q --batch --eval '(princ \"%s\")'" + (,command (format "%s -Q --batch --eval \"(princ \\\"%s\\\")\"" emacs ,str)) (inhibit-message t)) (unwind-protect @@ -761,7 +761,7 @@ See Bug#21722." (expected-point `((beg-last-out . ,(1+ (length str))) (end-last-out . ,(1+ (* 2 (length str)))) (save-point . 1)))) - (dolist (output-buffer-is-current '(t ni)) + (dolist (output-buffer-is-current '(nil)) (with-shell-command-dont-erase-buffer str output-buffer-is-current (when (memq shell-command-dont-erase-buffer '(beg-last-out end-last-out save-point)) (should (= (point) (alist-get shell-command-dont-erase-buffer expected-point)))))))) |