# HG changeset patch # User Richard M. Stallman # Date 870655867 0 # Node ID 98515e50136d9f96af0067eff23c7c5520e61f32 # Parent 68f319192499e68d9f0bf8712b08550d61ec65c7 (shell-command-on-region, shell-command): Doc fixes. (do-auto-fill): Don't break the line right after a comment starter. diff -r 68f319192499 -r 98515e50136d lisp/simple.el --- 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,