diff options
| author | Richard M. Stallman | 1997-08-04 00:51:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-04 00:51:07 +0000 |
| commit | 07f458c1df89b8580e3528cc76a535a85e1f7b9e (patch) | |
| tree | 2a3077de6c3acf1085ac92c87c27b4c81c2dee6d | |
| parent | 5382dacc9bc388f7752fdfb333e348d001055b3c (diff) | |
| download | emacs-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.el | 27 |
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. | |||
| 837 | If there is no output, or if output is inserted in the current buffer, | 837 | If there is no output, or if output is inserted in the current buffer, |
| 838 | then `*Shell Command Output*' is deleted. | 838 | then `*Shell Command Output*' is deleted. |
| 839 | 839 | ||
| 840 | To specify a coding system for converting non-ASCII characters | ||
| 841 | in the shell command output, use \\[universal-coding-system-argument] | ||
| 842 | before this command. | ||
| 843 | |||
| 844 | Noninteractive callers can specify coding systems by binding | ||
| 845 | `coding-system-for-read' and `coding-system-for-write'. | ||
| 846 | |||
| 840 | The optional second argument OUTPUT-BUFFER, if non-nil, | 847 | The optional second argument OUTPUT-BUFFER, if non-nil, |
| 841 | says to put the output in some other buffer. | 848 | says to put the output in some other buffer. |
| 842 | If OUTPUT-BUFFER is a buffer or buffer name, put the output there. | 849 | 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)." | |||
| 915 | Normally display output (if any) in temp buffer `*Shell Command Output*'; | 922 | Normally display output (if any) in temp buffer `*Shell Command Output*'; |
| 916 | Prefix arg means replace the region with it. | 923 | Prefix arg means replace the region with it. |
| 917 | 924 | ||
| 925 | To specify a coding system for converting non-ASCII characters | ||
| 926 | in the input and output to the shell command, use \\[universal-coding-system-argument] | ||
| 927 | before this command. By default, the input (from the current buffer) | ||
| 928 | is 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, | ||
| 930 | then it is decoded from that same coding system. | ||
| 931 | |||
| 918 | The noninteractive arguments are START, END, COMMAND, OUTPUT-BUFFER, REPLACE. | 932 | The noninteractive arguments are START, END, COMMAND, OUTPUT-BUFFER, REPLACE. |
| 919 | If REPLACE is non-nil, that means insert the output | 933 | If REPLACE is non-nil, that means insert the output |
| 920 | in place of text from START to END, putting point and mark around it. | 934 | in place of text from START to END, putting point and mark around it. |
| 935 | Noninteractive callers can specify coding systems by binding | ||
| 936 | `coding-system-for-read' and `coding-system-for-write'. | ||
| 921 | 937 | ||
| 922 | If the output is one line, it is displayed in the echo area, | 938 | If the output is one line, it is displayed in the echo area, |
| 923 | but it is nonetheless available in buffer `*Shell Command Output*' | 939 | 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." | |||
| 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, |