comparison lisp/textmodes/fill.el @ 11448:b0a7e8ff84ad

(fill-paragraph, fill-region, fill-nonuniform-paragraphs) (fill-individual-paragraphs): Pass `full' for JUSTIFY arg, in the interactive spec, if have prefix arg.
author Richard M. Stallman <rms@gnu.org>
date Fri, 14 Apr 1995 18:33:44 +0000
parents 4be78e93d1be
children d6d785d96455
comparison
equal deleted inserted replaced
11447:d51e912495be 11448:b0a7e8ff84ad
349 If `sentence-end-double-space' is non-nil, then period followed by one 349 If `sentence-end-double-space' is non-nil, then period followed by one
350 space does not end a sentence, so don't break a line there. 350 space does not end a sentence, so don't break a line there.
351 351
352 If `fill-paragraph-function' is non-nil, we call it (passing our 352 If `fill-paragraph-function' is non-nil, we call it (passing our
353 argument to it), and if it returns non-nil, we simply return its value." 353 argument to it), and if it returns non-nil, we simply return its value."
354 (interactive "P") 354 (interactive (list (if current-prefix-arg 'full)))
355 (or (and fill-paragraph-function 355 (or (and fill-paragraph-function
356 (let ((function fill-paragraph-function) 356 (let ((function fill-paragraph-function)
357 fill-paragraph-function) 357 fill-paragraph-function)
358 (funcall function arg))) 358 (funcall function arg)))
359 (let ((before (point))) 359 (let ((before (point)))
378 non-nil means to keep filling to the end of the paragraph (or next 378 non-nil means to keep filling to the end of the paragraph (or next
379 hard newline, if `use-hard-newlines' is on). 379 hard newline, if `use-hard-newlines' is on).
380 380
381 If `sentence-end-double-space' is non-nil, then period followed by one 381 If `sentence-end-double-space' is non-nil, then period followed by one
382 space does not end a sentence, so don't break a line there." 382 space does not end a sentence, so don't break a line there."
383 (interactive "r\nP") 383 (interactive (list (region-beginning) (region-end)
384 (if current-prefix-arg 'full)))
384 (let (end beg) 385 (let (end beg)
385 (save-restriction 386 (save-restriction
386 (goto-char (max from to)) 387 (goto-char (max from to))
387 (if to-eop 388 (if to-eop
388 (progn (skip-chars-backward "\n") 389 (progn (skip-chars-backward "\n")
714 When calling from a program, pass range to fill as first two arguments. 715 When calling from a program, pass range to fill as first two arguments.
715 716
716 Optional third and fourth arguments JUSTIFY and MAIL-FLAG: 717 Optional third and fourth arguments JUSTIFY and MAIL-FLAG:
717 JUSTIFY to justify paragraphs (prefix arg), 718 JUSTIFY to justify paragraphs (prefix arg),
718 MAIL-FLAG for a mail message, i. e. don't fill header lines." 719 MAIL-FLAG for a mail message, i. e. don't fill header lines."
719 (interactive "r\nP") 720 (interactive (list (region-beginning) (region-end)
721 (if current-prefix-arg 'full)))
720 (let ((fill-individual-varying-indent t)) 722 (let ((fill-individual-varying-indent t))
721 (fill-individual-paragraphs min max justifyp mailp))) 723 (fill-individual-paragraphs min max justifyp mailp)))
722 724
723 (defun fill-individual-paragraphs (min max &optional justify mailp) 725 (defun fill-individual-paragraphs (min max &optional justify mailp)
724 "Fill paragraphs of uniform indentation within the region. 726 "Fill paragraphs of uniform indentation within the region.
729 When calling from a program, pass range to fill as first two arguments. 731 When calling from a program, pass range to fill as first two arguments.
730 732
731 Optional third and fourth arguments JUSTIFY and MAIL-FLAG: 733 Optional third and fourth arguments JUSTIFY and MAIL-FLAG:
732 JUSTIFY to justify paragraphs (prefix arg), 734 JUSTIFY to justify paragraphs (prefix arg),
733 MAIL-FLAG for a mail message, i. e. don't fill header lines." 735 MAIL-FLAG for a mail message, i. e. don't fill header lines."
734 (interactive "r\nP") 736 (interactive (list (region-beginning) (region-end)
737 (if current-prefix-arg 'full)))
735 (save-restriction 738 (save-restriction
736 (save-excursion 739 (save-excursion
737 (goto-char min) 740 (goto-char min)
738 (beginning-of-line) 741 (beginning-of-line)
739 (narrow-to-region (point) max) 742 (narrow-to-region (point) max)