aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-04 00:51:07 +0000
committerRichard M. Stallman1997-08-04 00:51:07 +0000
commit07f458c1df89b8580e3528cc76a535a85e1f7b9e (patch)
tree2a3077de6c3acf1085ac92c87c27b4c81c2dee6d
parent5382dacc9bc388f7752fdfb333e348d001055b3c (diff)
downloademacs-07f458c1df89b8580e3528cc76a535a85e1f7b9e.tar.gz
emacs-07f458c1df89b8580e3528cc76a535a85e1f7b9e.zip
(shell-command-on-region, shell-command): Doc fixes.
(do-auto-fill): Don't break the line right after a comment starter.
-rw-r--r--lisp/simple.el27
1 files changed, 26 insertions, 1 deletions
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.
837If there is no output, or if output is inserted in the current buffer, 837If there is no output, or if output is inserted in the current buffer,
838then `*Shell Command Output*' is deleted. 838then `*Shell Command Output*' is deleted.
839 839
840To specify a coding system for converting non-ASCII characters
841in the shell command output, use \\[universal-coding-system-argument]
842before this command.
843
844Noninteractive callers can specify coding systems by binding
845`coding-system-for-read' and `coding-system-for-write'.
846
840The optional second argument OUTPUT-BUFFER, if non-nil, 847The optional second argument OUTPUT-BUFFER, if non-nil,
841says to put the output in some other buffer. 848says to put the output in some other buffer.
842If OUTPUT-BUFFER is a buffer or buffer name, put the output there. 849If 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)."
915Normally display output (if any) in temp buffer `*Shell Command Output*'; 922Normally display output (if any) in temp buffer `*Shell Command Output*';
916Prefix arg means replace the region with it. 923Prefix arg means replace the region with it.
917 924
925To specify a coding system for converting non-ASCII characters
926in the input and output to the shell command, use \\[universal-coding-system-argument]
927before this command. By default, the input (from the current buffer)
928is encoded in the same coding system that will be used to save the file,
929`buffer-file-coding-system'. If the output is going to replace the region,
930then it is decoded from that same coding system.
931
918The noninteractive arguments are START, END, COMMAND, OUTPUT-BUFFER, REPLACE. 932The noninteractive arguments are START, END, COMMAND, OUTPUT-BUFFER, REPLACE.
919If REPLACE is non-nil, that means insert the output 933If REPLACE is non-nil, that means insert the output
920in place of text from START to END, putting point and mark around it. 934in place of text from START to END, putting point and mark around it.
935Noninteractive callers can specify coding systems by binding
936`coding-system-for-read' and `coding-system-for-write'.
921 937
922If the output is one line, it is displayed in the echo area, 938If the output is one line, it is displayed in the echo area,
923but it is nonetheless available in buffer `*Shell Command Output*' 939but it is nonetheless available in buffer `*Shell Command Output*'
@@ -2668,11 +2684,20 @@ Setting this variable automatically makes it local to the current buffer."
2668 (forward-line 0) (point)))) 2684 (forward-line 0) (point))))
2669 ;; Let fill-point be set to the place where we end up. 2685 ;; Let fill-point be set to the place where we end up.
2670 (point))))) 2686 (point)))))
2687
2671 ;; If that place is not the beginning of the line, 2688 ;; If that place is not the beginning of the line,
2672 ;; break the line there. 2689 ;; break the line there.
2673 (if (save-excursion 2690 (if (save-excursion
2674 (goto-char fill-point) 2691 (goto-char fill-point)
2675 (not (bolp))) 2692 (and (not (bolp))
2693 ;; Don't split right after a comment starter
2694 ;; since we would just make another comment starter.
2695 (not (and comment-start-skip
2696 (let ((limit (point)))
2697 (beginning-of-line)
2698 (and (re-search-forward comment-start-skip
2699 limit t)
2700 (eq (point) limit)))))))
2676 (let ((prev-column (current-column))) 2701 (let ((prev-column (current-column)))
2677 ;; If point is at the fill-point, do not `save-excursion'. 2702 ;; If point is at the fill-point, do not `save-excursion'.
2678 ;; Otherwise, if a comment prefix or fill-prefix is inserted, 2703 ;; Otherwise, if a comment prefix or fill-prefix is inserted,