Mercurial > hg > xemacs-beta
comparison lisp/prim/process.el @ 151:59463afc5666 r20-3b2
Import from CVS: tag r20-3b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:37:19 +0200 |
parents | 7d55a9ba150c |
children | 25f70ba0133c |
comparison
equal
deleted
inserted
replaced
150:8ebb1c0f0f6f | 151:59463afc5666 |
---|---|
190 that says to put the output in some other buffer. | 190 that says to put the output in some other buffer. |
191 If OUTPUT-BUFFER is a buffer or buffer name, put the output there. | 191 If OUTPUT-BUFFER is a buffer or buffer name, put the output there. |
192 If OUTPUT-BUFFER is not a buffer and not nil, | 192 If OUTPUT-BUFFER is not a buffer and not nil, |
193 insert output in the current buffer. | 193 insert output in the current buffer. |
194 In either case, the output is inserted after point (leaving mark after it)." | 194 In either case, the output is inserted after point (leaving mark after it)." |
195 (interactive (if (not (region-exists-p)) | 195 (interactive (let ((string |
196 (error "The region is not active now") | |
197 (let ((string | |
198 ;; Do this before calling region-beginning | 196 ;; Do this before calling region-beginning |
199 ;; and region-end, in case subprocess output | 197 ;; and region-end, in case subprocess output |
200 ;; relocates them while we are in the minibuffer. | 198 ;; relocates them while we are in the minibuffer. |
201 (read-shell-command "Shell command on region: "))) | 199 (read-shell-command "Shell command on region: "))) |
202 ;; call-interactively recognizes region-beginning and | 200 ;; call-interactively recognizes region-beginning and |
203 ;; region-end specially, leaving them in the history. | 201 ;; region-end specially, leaving them in the history. |
204 (list (region-beginning) (region-end) | 202 (list (region-beginning) (region-end) |
205 string | 203 string |
206 current-prefix-arg | 204 current-prefix-arg |
207 current-prefix-arg)))) | 205 current-prefix-arg))) |
208 (if (or replace | 206 (if (or replace |
209 (and output-buffer | 207 (and output-buffer |
210 (not (or (bufferp output-buffer) (stringp output-buffer))))) | 208 (not (or (bufferp output-buffer) (stringp output-buffer))))) |
211 ;; Replace specified region with output from command. | 209 ;; Replace specified region with output from command. |
212 (let ((swap (and replace (< start end)))) | 210 (let ((swap (and replace (< start end)))) |