From: Richard M. Stallman Date: Mon, 4 Aug 1997 00:51:07 +0000 (+0000) Subject: (shell-command-on-region, shell-command): Doc fixes. X-Git-Tag: emacs-20.1~837 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=07f458c1df89b8580e3528cc76a535a85e1f7b9e;p=emacs.git (shell-command-on-region, shell-command): Doc fixes. (do-auto-fill): Don't break the line right after a comment starter. --- diff --git a/lisp/simple.el b/lisp/simple.el index 00bf4c5d967..4c55b4e9df0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -837,6 +837,13 @@ even though that buffer is not automatically displayed. 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 @@ In either case, the output is inserted after point (leaving mark after it)." 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 @@ Setting this variable automatically makes it local to the current buffer." (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,