diff options
| author | Dave Love | 1999-07-20 16:02:27 +0000 |
|---|---|---|
| committer | Dave Love | 1999-07-20 16:02:27 +0000 |
| commit | 369aeb97a94aa114365823eea2dad4dcadb9d8eb (patch) | |
| tree | 6eb280b18274d8c47eb1ad527e2d0567d120d5a6 | |
| parent | 4ea1d5dd95ff5e9e003481dd31215df27197a35c (diff) | |
| download | emacs-369aeb97a94aa114365823eea2dad4dcadb9d8eb.tar.gz emacs-369aeb97a94aa114365823eea2dad4dcadb9d8eb.zip | |
(canonically-space-region, justify-current-line): Add * to interactive
spec.
(fill-region-as-paragraph, fill-paragraph, fill-region)
(fill-nonuniform-paragraphs, fill-individual-paragraphs): Check
readonly buffer in interactive spec.
| -rw-r--r-- | lisp/textmodes/fill.el | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 3c88abc615c..fe8e5250dc3 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; fill.el --- fill commands for Emacs | 1 | ;;; fill.el --- fill commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 92, 94, 95, 96, 1997 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 86, 92, 94, 95, 96, 97, 1999 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Keywords: wp | 5 | ;; Keywords: wp |
| 6 | 6 | ||
| @@ -148,7 +148,7 @@ Leave one space between words, two at end of sentences or after colons | |||
| 148 | \(depending on values of `sentence-end-double-space', `colon-double-space', | 148 | \(depending on values of `sentence-end-double-space', `colon-double-space', |
| 149 | and `sentence-end-without-period'). | 149 | and `sentence-end-without-period'). |
| 150 | Remove indentation from each line." | 150 | Remove indentation from each line." |
| 151 | (interactive "r") | 151 | (interactive "*r") |
| 152 | (save-excursion | 152 | (save-excursion |
| 153 | (goto-char beg) | 153 | (goto-char beg) |
| 154 | ;; Nuke tabs; they get screwed up in a fill. | 154 | ;; Nuke tabs; they get screwed up in a fill. |
| @@ -319,8 +319,10 @@ means don't canonicalize spaces before that position. | |||
| 319 | 319 | ||
| 320 | If `sentence-end-double-space' is non-nil, then period followed by one | 320 | If `sentence-end-double-space' is non-nil, then period followed by one |
| 321 | space does not end a sentence, so don't break a line there." | 321 | space does not end a sentence, so don't break a line there." |
| 322 | (interactive (list (region-beginning) (region-end) | 322 | (interactive (progn |
| 323 | (if current-prefix-arg 'full))) | 323 | (barf-if-buffer-read-only) |
| 324 | (list (region-beginning) (region-end) | ||
| 325 | (if current-prefix-arg 'full)))) | ||
| 324 | (unless (memq justify '(t nil none full center left right)) | 326 | (unless (memq justify '(t nil none full center left right)) |
| 325 | (setq justify 'full)) | 327 | (setq justify 'full)) |
| 326 | ;; Arrange for undoing the fill to restore point. | 328 | ;; Arrange for undoing the fill to restore point. |
| @@ -631,7 +633,9 @@ the variable `fill-column' controls the width for filling. | |||
| 631 | 633 | ||
| 632 | If `fill-paragraph-function' is non-nil, we call it (passing our | 634 | If `fill-paragraph-function' is non-nil, we call it (passing our |
| 633 | argument to it), and if it returns non-nil, we simply return its value." | 635 | argument to it), and if it returns non-nil, we simply return its value." |
| 634 | (interactive (list (if current-prefix-arg 'full))) | 636 | (interactive (progn |
| 637 | (barf-if-buffer-read-only) | ||
| 638 | (list (if current-prefix-arg 'full)))) | ||
| 635 | (or (and fill-paragraph-function | 639 | (or (and fill-paragraph-function |
| 636 | (let ((function fill-paragraph-function) | 640 | (let ((function fill-paragraph-function) |
| 637 | fill-paragraph-function) | 641 | fill-paragraph-function) |
| @@ -669,8 +673,10 @@ hard newline, if `use-hard-newlines' is on). | |||
| 669 | 673 | ||
| 670 | If `sentence-end-double-space' is non-nil, then period followed by one | 674 | If `sentence-end-double-space' is non-nil, then period followed by one |
| 671 | space does not end a sentence, so don't break a line there." | 675 | space does not end a sentence, so don't break a line there." |
| 672 | (interactive (list (region-beginning) (region-end) | 676 | (interactive (progn |
| 673 | (if current-prefix-arg 'full))) | 677 | (barf-if-buffer-read-only) |
| 678 | (list (region-beginning) (region-end) | ||
| 679 | (if current-prefix-arg 'full)))) | ||
| 674 | (unless (memq justify '(t nil none full center left right)) | 680 | (unless (memq justify '(t nil none full center left right)) |
| 675 | (setq justify 'full)) | 681 | (setq justify 'full)) |
| 676 | (let (end beg) | 682 | (let (end beg) |
| @@ -847,7 +853,7 @@ Second arg EOP non-nil means that this is the last line of the paragraph, so | |||
| 847 | it will not be stretched by full justification. | 853 | it will not be stretched by full justification. |
| 848 | Third arg NOSQUEEZE non-nil means to leave interior whitespace unchanged, | 854 | Third arg NOSQUEEZE non-nil means to leave interior whitespace unchanged, |
| 849 | otherwise it is made canonical." | 855 | otherwise it is made canonical." |
| 850 | (interactive) | 856 | (interactive "*") |
| 851 | (if (eq t how) (setq how (or (current-justification) 'none)) | 857 | (if (eq t how) (setq how (or (current-justification) 'none)) |
| 852 | (if (null how) (setq how 'full) | 858 | (if (null how) (setq how 'full) |
| 853 | (or (memq how '(none left right center)) | 859 | (or (memq how '(none left right center)) |
| @@ -1026,8 +1032,10 @@ When filling a mail message, pass a regexp for CITATION-REGEXP | |||
| 1026 | which will match the prefix of a line which is a citation marker | 1032 | which will match the prefix of a line which is a citation marker |
| 1027 | plus whitespace, but no other kind of prefix. | 1033 | plus whitespace, but no other kind of prefix. |
| 1028 | Also, if CITATION-REGEXP is non-nil, don't fill header lines." | 1034 | Also, if CITATION-REGEXP is non-nil, don't fill header lines." |
| 1029 | (interactive (list (region-beginning) (region-end) | 1035 | (interactive (progn |
| 1030 | (if current-prefix-arg 'full))) | 1036 | (barf-if-buffer-read-only) |
| 1037 | (list (region-beginning) (region-end) | ||
| 1038 | (if current-prefix-arg 'full)))) | ||
| 1031 | (let ((fill-individual-varying-indent t)) | 1039 | (let ((fill-individual-varying-indent t)) |
| 1032 | (fill-individual-paragraphs min max justifyp citation-regexp))) | 1040 | (fill-individual-paragraphs min max justifyp citation-regexp))) |
| 1033 | 1041 | ||
| @@ -1054,8 +1062,10 @@ When filling a mail message, pass a regexp for CITATION-REGEXP | |||
| 1054 | which will match the prefix of a line which is a citation marker | 1062 | which will match the prefix of a line which is a citation marker |
| 1055 | plus whitespace, but no other kind of prefix. | 1063 | plus whitespace, but no other kind of prefix. |
| 1056 | Also, if CITATION-REGEXP is non-nil, don't fill header lines." | 1064 | Also, if CITATION-REGEXP is non-nil, don't fill header lines." |
| 1057 | (interactive (list (region-beginning) (region-end) | 1065 | (interactive (progn |
| 1058 | (if current-prefix-arg 'full))) | 1066 | (barf-if-buffer-read-only) |
| 1067 | (list (region-beginning) (region-end) | ||
| 1068 | (if current-prefix-arg 'full)))) | ||
| 1059 | (save-restriction | 1069 | (save-restriction |
| 1060 | (save-excursion | 1070 | (save-excursion |
| 1061 | (goto-char min) | 1071 | (goto-char min) |