Add explicit arg REPLACE to the callers of `shell-command-on-region'.

* lisp/simple.el (shell-command-on-region): Doc fix.

* lisp/emulation/vi.el (vi-shell-op):
* lisp/emulation/vip.el (vip-execute-com, ex-command):
* lisp/emulation/viper-cmd.el (viper-exec-bang):
* lisp/emulation/viper-ex.el (ex-command): Add non-nil arg REPLACE to
the call of `shell-command-on-region'. 

* lisp/mh-e/mh-alias.el (mh-alias-local-users): Add non-nil arg REPLACE to
the call of `shell-command-on-region'.

Fixes: debbugs:14637
This commit is contained in:
Juri Linkov 2013-06-18 23:24:44 +03:00
parent 8fbcca1658
commit 0950aa27a2
8 changed files with 27 additions and 10 deletions

View file

@ -1,3 +1,13 @@
2013-06-18 Juri Linkov <juri@jurta.org>
* emulation/vi.el (vi-shell-op):
* emulation/vip.el (vip-execute-com, ex-command):
* emulation/viper-cmd.el (viper-exec-bang):
* emulation/viper-ex.el (ex-command): Add non-nil arg REPLACE to
the call of `shell-command-on-region'. (Bug#14637)
* simple.el (shell-command-on-region): Doc fix.
2013-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/eieio-custom.el: Remove misleading Version: header

View file

@ -1148,7 +1148,8 @@ If char argument is given, it directs the output to a *temp* buffer."
(cond ((null shell-command)
(setq shell-command (read-string "!" nil))
(setq vi-last-shell-command shell-command)))
(shell-command-on-region begin end shell-command (not (vi-prefix-char-value arg)))
(shell-command-on-region begin end shell-command (not (vi-prefix-char-value arg))
(not (vi-prefix-char-value arg)))
t)))
(defun vi-shift-op (motion-command arg amount)

View file

@ -775,7 +775,7 @@ to vip-d-com for later use by vip-repeat"
(if (= com ?!)
(setq vip-last-shell-com (vip-read-string "!"))
vip-last-shell-com)
t)))
t t)))
((= com ?=)
(save-excursion
(set-mark vip-com-point)
@ -3042,7 +3042,7 @@ vip-s-string"
(goto-char beg)
(set-mark end)
(vip-enlarge-region (point) (mark))
(shell-command-on-region (point) (mark) command t))
(shell-command-on-region (point) (mark) command t t))
(goto-char beg)))))
(defun ex-line-no ()

View file

@ -1548,7 +1548,7 @@ as a Meta key and any number of multiple escapes are allowed."
(car viper-shell-history)
))
viper-last-shell-com)
t)))
t t)))
(defun viper-exec-equals (m-com com)
(save-excursion

View file

@ -2176,7 +2176,7 @@ Please contact your system administrator. "
(goto-char beg)
(set-mark end)
(viper-enlarge-region (point) (mark t))
(shell-command-on-region (point) (mark t) command t))
(shell-command-on-region (point) (mark t) command t t))
(goto-char beg)))))
(defun ex-compile ()

View file

@ -1,3 +1,8 @@
2013-06-18 Juri Linkov <juri@jurta.org>
* mh-alias.el (mh-alias-local-users): Add non-nil arg REPLACE to
the call of `shell-command-on-region'. (Bug#14637)
2013-05-22 Glenn Morris <rgm@gnu.org>
* mh-speed.el (mh-speed-view):

View file

@ -141,7 +141,7 @@ Exclude all aliases already in `mh-alias-alist' from \"ali\""
(insert-file-contents "/etc/passwd")))
((stringp mh-alias-local-users)
(insert mh-alias-local-users "\n")
(shell-command-on-region (point-min) (point-max) mh-alias-local-users t)
(shell-command-on-region (point-min) (point-max) mh-alias-local-users t t)
(goto-char (point-min))))
(while (< (point) (point-max))
(cond

View file

@ -2849,10 +2849,11 @@ output is inserted in the current buffer, the buffer `*Shell
Command Output*' is deleted.
Optional fourth arg OUTPUT-BUFFER specifies where to put the
command's output. If the value is a buffer or buffer name, put
the output there. Any other value, excluding nil, means to
insert the output in the current buffer. In either case, the
output is inserted after point (leaving mark after it).
command's output. If the value is a buffer or buffer name,
put the output there. If the value is nil, use the buffer
`*Shell Command Output*'. Any other value, excluding nil,
means to insert the output in the current buffer. In either case,
the output is inserted after point (leaving mark after it).
Optional fifth arg REPLACE, if non-nil, means to insert the
output in place of text from START to END, putting point and mark