Mercurial > emacs
diff lisp/simple.el @ 89966:d8411455de48
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-32
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-486
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-487
Tweak permissions
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-488
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-489
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-490
Update from CVS: man/fixit.texi (Spelling): Fix typo.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-491
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-494
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-495
Update from CVS: Add missing lisp/mh-e files
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-496
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-499
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-500
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-513
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 27 Aug 2004 07:00:34 +0000 |
parents | 3fd4a5c21153 486136b7f89c |
children | 3219f94257bc |
line wrap: on
line diff
--- a/lisp/simple.el Wed Aug 18 06:38:14 2004 +0000 +++ b/lisp/simple.el Fri Aug 27 07:00:34 2004 +0000 @@ -1628,7 +1628,7 @@ (defun shell-command-on-region (start end command &optional output-buffer replace - error-buffer) + error-buffer display-error-buffer) "Execute string COMMAND in inferior shell with region as input. Normally display output (if any) in temp buffer `*Shell Command Output*'; Prefix arg means replace the region with it. Return the exit code of @@ -1641,10 +1641,10 @@ `buffer-file-coding-system'. If the output is going to replace the region, then it is decoded from that same coding system. -The noninteractive arguments are START, END, COMMAND, OUTPUT-BUFFER, -REPLACE, ERROR-BUFFER. Noninteractive callers can specify coding -systems by binding `coding-system-for-read' and -`coding-system-for-write'. +The noninteractive arguments are START, END, COMMAND, +OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER. +Noninteractive callers can specify coding systems by binding +`coding-system-for-read' and `coding-system-for-write'. If the command generates output, the output may be displayed in the echo area or in a buffer. @@ -1674,6 +1674,8 @@ If optional sixth argument ERROR-BUFFER is non-nil, it is a buffer or buffer name to which to direct the command's standard error output. If it is nil, error output is mingled with regular output. +If DISPLAY-ERROR-BUFFER is non-nil, display the error buffer if there +were any errors. (This is always t, interactively.) In an interactive call, the variable `shell-command-default-error-buffer' specifies the value of ERROR-BUFFER." (interactive (let (string) @@ -1691,7 +1693,8 @@ string current-prefix-arg current-prefix-arg - shell-command-default-error-buffer))) + shell-command-default-error-buffer + t))) (let ((error-file (if error-buffer (make-temp-file @@ -1800,7 +1803,8 @@ (format-insert-file error-file nil) ;; Put point after the inserted errors. (goto-char (- (point-max) pos-from-end))) - (display-buffer (current-buffer)))) + (and display-error-buffer + (display-buffer (current-buffer))))) (delete-file error-file)) exit-status))