/[emacs]/emacs/lisp/simple.el
ViewVC logotype

Diff of /emacs/lisp/simple.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.551.2.23 by miles, Sat Sep 4 09:21:44 2004 UTC revision 1.551.2.24 by miles, Sat Sep 4 09:26:22 2004 UTC
# Line 1628  and only used if a buffer is displayed." Line 1628  and only used if a buffer is displayed."
1628    
1629  (defun shell-command-on-region (start end command  (defun shell-command-on-region (start end command
1630                                        &optional output-buffer replace                                        &optional output-buffer replace
1631                                        error-buffer)                                        error-buffer display-error-buffer)
1632    "Execute string COMMAND in inferior shell with region as input.    "Execute string COMMAND in inferior shell with region as input.
1633  Normally display output (if any) in temp buffer `*Shell Command Output*';  Normally display output (if any) in temp buffer `*Shell Command Output*';
1634  Prefix arg means replace the region with it.  Return the exit code of  Prefix arg means replace the region with it.  Return the exit code of
# Line 1641  is encoded in the same coding system tha Line 1641  is encoded in the same coding system tha
1641  `buffer-file-coding-system'.  If the output is going to replace the region,  `buffer-file-coding-system'.  If the output is going to replace the region,
1642  then it is decoded from that same coding system.  then it is decoded from that same coding system.
1643    
1644  The noninteractive arguments are START, END, COMMAND, OUTPUT-BUFFER,  The noninteractive arguments are START, END, COMMAND,
1645  REPLACE, ERROR-BUFFER.  Noninteractive callers can specify coding  OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER.
1646  systems by binding `coding-system-for-read' and  Noninteractive callers can specify coding systems by binding
1647  `coding-system-for-write'.  `coding-system-for-read' and `coding-system-for-write'.
1648    
1649  If the command generates output, the output may be displayed  If the command generates output, the output may be displayed
1650  in the echo area or in a buffer.  in the echo area or in a buffer.
# Line 1674  around it. Line 1674  around it.
1674  If optional sixth argument ERROR-BUFFER is non-nil, it is a buffer  If optional sixth argument ERROR-BUFFER is non-nil, it is a buffer
1675  or buffer name to which to direct the command's standard error output.  or buffer name to which to direct the command's standard error output.
1676  If it is nil, error output is mingled with regular output.  If it is nil, error output is mingled with regular output.
1677    If DISPLAY-ERROR-BUFFER is non-nil, display the error buffer if there
1678    were any errors.  (This is always t, interactively.)
1679  In an interactive call, the variable `shell-command-default-error-buffer'  In an interactive call, the variable `shell-command-default-error-buffer'
1680  specifies the value of ERROR-BUFFER."  specifies the value of ERROR-BUFFER."
1681    (interactive (let (string)    (interactive (let (string)
# Line 1691  specifies the value of ERROR-BUFFER." Line 1693  specifies the value of ERROR-BUFFER."
1693                         string                         string
1694                         current-prefix-arg                         current-prefix-arg
1695                         current-prefix-arg                         current-prefix-arg
1696                         shell-command-default-error-buffer)))                         shell-command-default-error-buffer
1697                           t)))
1698    (let ((error-file    (let ((error-file
1699           (if error-buffer           (if error-buffer
1700               (make-temp-file               (make-temp-file
# Line 1800  specifies the value of ERROR-BUFFER." Line 1803  specifies the value of ERROR-BUFFER."
1803                (format-insert-file error-file nil)                (format-insert-file error-file nil)
1804                ;; Put point after the inserted errors.                ;; Put point after the inserted errors.
1805                (goto-char (- (point-max) pos-from-end)))                (goto-char (- (point-max) pos-from-end)))
1806              (display-buffer (current-buffer))))              (and display-error-buffer
1807                     (display-buffer (current-buffer)))))
1808        (delete-file error-file))        (delete-file error-file))
1809      exit-status))      exit-status))
1810    

Legend:
Removed from v.1.551.2.23  
changed lines
  Added in v.1.551.2.24

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26