Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
89965:5e9097d1ad99 | 89966:d8411455de48 |
---|---|
1626 (car (cdr (cdr (process-command process)))) | 1626 (car (cdr (cdr (process-command process)))) |
1627 (substring signal 0 -1)))) | 1627 (substring signal 0 -1)))) |
1628 | 1628 |
1629 (defun shell-command-on-region (start end command | 1629 (defun shell-command-on-region (start end command |
1630 &optional output-buffer replace | 1630 &optional output-buffer replace |
1631 error-buffer) | 1631 error-buffer display-error-buffer) |
1632 "Execute string COMMAND in inferior shell with region as input. | 1632 "Execute string COMMAND in inferior shell with region as input. |
1633 Normally display output (if any) in temp buffer `*Shell Command Output*'; | 1633 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 | 1634 Prefix arg means replace the region with it. Return the exit code of |
1635 COMMAND. | 1635 COMMAND. |
1636 | 1636 |
1639 before this command. By default, the input (from the current buffer) | 1639 before this command. By default, the input (from the current buffer) |
1640 is encoded in the same coding system that will be used to save the file, | 1640 is encoded in the same coding system that will be used to save the file, |
1641 `buffer-file-coding-system'. If the output is going to replace the region, | 1641 `buffer-file-coding-system'. If the output is going to replace the region, |
1642 then it is decoded from that same coding system. | 1642 then it is decoded from that same coding system. |
1643 | 1643 |
1644 The noninteractive arguments are START, END, COMMAND, OUTPUT-BUFFER, | 1644 The noninteractive arguments are START, END, COMMAND, |
1645 REPLACE, ERROR-BUFFER. Noninteractive callers can specify coding | 1645 OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER. |
1646 systems by binding `coding-system-for-read' and | 1646 Noninteractive callers can specify coding systems by binding |
1647 `coding-system-for-write'. | 1647 `coding-system-for-read' and `coding-system-for-write'. |
1648 | 1648 |
1649 If the command generates output, the output may be displayed | 1649 If the command generates output, the output may be displayed |
1650 in the echo area or in a buffer. | 1650 in the echo area or in a buffer. |
1651 If the output is short enough to display in the echo area | 1651 If the output is short enough to display in the echo area |
1652 \(determined by the variable `max-mini-window-height' if | 1652 \(determined by the variable `max-mini-window-height' if |
1672 around it. | 1672 around it. |
1673 | 1673 |
1674 If optional sixth argument ERROR-BUFFER is non-nil, it is a buffer | 1674 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. | 1675 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. | 1676 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.) | |
1677 In an interactive call, the variable `shell-command-default-error-buffer' | 1679 In an interactive call, the variable `shell-command-default-error-buffer' |
1678 specifies the value of ERROR-BUFFER." | 1680 specifies the value of ERROR-BUFFER." |
1679 (interactive (let (string) | 1681 (interactive (let (string) |
1680 (unless (mark) | 1682 (unless (mark) |
1681 (error "The mark is not set now, so there is no region")) | 1683 (error "The mark is not set now, so there is no region")) |
1689 ;; region-end specially, leaving them in the history. | 1691 ;; region-end specially, leaving them in the history. |
1690 (list (region-beginning) (region-end) | 1692 (list (region-beginning) (region-end) |
1691 string | 1693 string |
1692 current-prefix-arg | 1694 current-prefix-arg |
1693 current-prefix-arg | 1695 current-prefix-arg |
1694 shell-command-default-error-buffer))) | 1696 shell-command-default-error-buffer |
1697 t))) | |
1695 (let ((error-file | 1698 (let ((error-file |
1696 (if error-buffer | 1699 (if error-buffer |
1697 (make-temp-file | 1700 (make-temp-file |
1698 (expand-file-name "scor" | 1701 (expand-file-name "scor" |
1699 (or small-temporary-file-directory | 1702 (or small-temporary-file-directory |
1798 ;; because that can run a shell command, and we | 1801 ;; because that can run a shell command, and we |
1799 ;; don't want that to cause an infinite recursion. | 1802 ;; don't want that to cause an infinite recursion. |
1800 (format-insert-file error-file nil) | 1803 (format-insert-file error-file nil) |
1801 ;; Put point after the inserted errors. | 1804 ;; Put point after the inserted errors. |
1802 (goto-char (- (point-max) pos-from-end))) | 1805 (goto-char (- (point-max) pos-from-end))) |
1803 (display-buffer (current-buffer)))) | 1806 (and display-error-buffer |
1807 (display-buffer (current-buffer))))) | |
1804 (delete-file error-file)) | 1808 (delete-file error-file)) |
1805 exit-status)) | 1809 exit-status)) |
1806 | 1810 |
1807 (defun shell-command-to-string (command) | 1811 (defun shell-command-to-string (command) |
1808 "Execute shell command COMMAND and return its output as a string." | 1812 "Execute shell command COMMAND and return its output as a string." |