Mercurial > emacs
changeset 19109:98515e50136d
(shell-command-on-region, shell-command): Doc fixes.
(do-auto-fill): Don't break the line right after a comment starter.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 04 Aug 1997 00:51:07 +0000 |
parents | 68f319192499 |
children | e83c7cde0db5 |
files | lisp/simple.el |
diffstat | 1 files changed, 26 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Mon Aug 04 00:39:09 1997 +0000 +++ b/lisp/simple.el Mon Aug 04 00:51:07 1997 +0000 @@ -837,6 +837,13 @@ If there is no output, or if output is inserted in the current buffer, then `*Shell Command Output*' is deleted. +To specify a coding system for converting non-ASCII characters +in the shell command output, use \\[universal-coding-system-argument] +before this command. + +Noninteractive callers can specify coding systems by binding +`coding-system-for-read' and `coding-system-for-write'. + The optional second argument OUTPUT-BUFFER, if non-nil, says to put the output in some other buffer. If OUTPUT-BUFFER is a buffer or buffer name, put the output there. @@ -915,9 +922,18 @@ Normally display output (if any) in temp buffer `*Shell Command Output*'; Prefix arg means replace the region with it. +To specify a coding system for converting non-ASCII characters +in the input and output to the shell command, use \\[universal-coding-system-argument] +before this command. By default, the input (from the current buffer) +is encoded in the same coding system that will be used to save the file, +`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. If REPLACE is non-nil, that means insert the output in place of text from START to END, putting point and mark around it. +Noninteractive callers can specify coding systems by binding +`coding-system-for-read' and `coding-system-for-write'. If the output is one line, it is displayed in the echo area, but it is nonetheless available in buffer `*Shell Command Output*' @@ -2668,11 +2684,20 @@ (forward-line 0) (point)))) ;; Let fill-point be set to the place where we end up. (point))))) + ;; If that place is not the beginning of the line, ;; break the line there. (if (save-excursion (goto-char fill-point) - (not (bolp))) + (and (not (bolp)) + ;; Don't split right after a comment starter + ;; since we would just make another comment starter. + (not (and comment-start-skip + (let ((limit (point))) + (beginning-of-line) + (and (re-search-forward comment-start-skip + limit t) + (eq (point) limit))))))) (let ((prev-column (current-column))) ;; If point is at the fill-point, do not `save-excursion'. ;; Otherwise, if a comment prefix or fill-prefix is inserted,