summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2013-06-18 23:24:44 +0300
committerJuri Linkov <juri@jurta.org>2013-06-18 23:24:44 +0300
commit0950aa27a260158ab01e434281d7ea0ee9f8d023 (patch)
tree27e05c137176fc829cb73318fc7c18aa63f2a39f
parent8fbcca1658ad9604616f8fa9d2223d9993007e47 (diff)
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
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/emulation/vi.el3
-rw-r--r--lisp/emulation/vip.el4
-rw-r--r--lisp/emulation/viper-cmd.el2
-rw-r--r--lisp/emulation/viper-ex.el2
-rw-r--r--lisp/mh-e/ChangeLog5
-rw-r--r--lisp/mh-e/mh-alias.el2
-rw-r--r--lisp/simple.el9
8 files changed, 27 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b58b5046cb..0c3741d49a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el
index a59dd610c2..9aae40c0d0 100644
--- a/lisp/emulation/vi.el
+++ b/lisp/emulation/vi.el
@@ -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)
diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el
index ce131b854f..b32e6e7e35 100644
--- a/lisp/emulation/vip.el
+++ b/lisp/emulation/vip.el
@@ -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 ()
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index b2e476befd..e7b371365e 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -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
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el
index a2bdc28d2b..f4fcdfd119 100644
--- a/lisp/emulation/viper-ex.el
+++ b/lisp/emulation/viper-ex.el
@@ -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 ()
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 3db1780af6..d326132c92 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -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):
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el
index cc56c98180..e97ba1dd83 100644
--- a/lisp/mh-e/mh-alias.el
+++ b/lisp/mh-e/mh-alias.el
@@ -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
diff --git a/lisp/simple.el b/lisp/simple.el
index 34ebc8f122..363ce8407e 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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