comparison lisp/textmodes/fill.el @ 85400:62d330e3a0a8

(fill-individual-paragraphs): Doc fix. (adaptive-fill-function): Doc fix. Remove * from docstring.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 18 Oct 2007 13:24:15 +0000
parents 8f6c4eb58cdb
children 988c305fd2e0
comparison
equal deleted inserted replaced
85399:f887e22f9f21 85400:62d330e3a0a8
115 if it would act as a paragraph-starter on the second line." 115 if it would act as a paragraph-starter on the second line."
116 :type 'regexp 116 :type 'regexp
117 :group 'fill) 117 :group 'fill)
118 118
119 (defcustom adaptive-fill-function nil 119 (defcustom adaptive-fill-function nil
120 "*Function to call to choose a fill prefix for a paragraph, or nil. 120 "Function to call to choose a fill prefix for a paragraph, or nil.
121 nil means the function has not determined the fill prefix." 121 A nil value means the function has not determined the fill prefix."
122 :type '(choice (const nil) function) 122 :type '(choice (const nil) function)
123 :group 'fill) 123 :group 'fill)
124 124
125 (defvar fill-indent-according-to-mode nil ;Screws up CC-mode's filling tricks. 125 (defvar fill-indent-according-to-mode nil ;Screws up CC-mode's filling tricks.
126 "Whether or not filling should try to use the major mode's indentation.") 126 "Whether or not filling should try to use the major mode's indentation.")
1357 These lines are filled together. 1357 These lines are filled together.
1358 1358
1359 When calling from a program, pass the range to fill 1359 When calling from a program, pass the range to fill
1360 as the first two arguments. 1360 as the first two arguments.
1361 1361
1362 Optional third and fourth arguments JUSTIFY and MAIL-FLAG: 1362 Optional third and fourth arguments JUSTIFY and CITATION-REGEXP:
1363 JUSTIFY to justify paragraphs (prefix arg), 1363 JUSTIFY to justify paragraphs (prefix arg),
1364 When filling a mail message, pass a regexp for CITATION-REGEXP 1364 When filling a mail message, pass a regexp for CITATION-REGEXP
1365 which will match the prefix of a line which is a citation marker 1365 which will match the prefix of a line which is a citation marker
1366 plus whitespace, but no other kind of prefix. 1366 plus whitespace, but no other kind of prefix.
1367 Also, if CITATION-REGEXP is non-nil, don't fill header lines." 1367 Also, if CITATION-REGEXP is non-nil, don't fill header lines."
1446 ;; Fill this paragraph, but don't add a newline at the end. 1446 ;; Fill this paragraph, but don't add a newline at the end.
1447 (let ((had-newline (bolp))) 1447 (let ((had-newline (bolp)))
1448 (fill-region-as-paragraph start (point) justify) 1448 (fill-region-as-paragraph start (point) justify)
1449 (if (and (bolp) (not had-newline)) 1449 (if (and (bolp) (not had-newline))
1450 (delete-char -1)))))))) 1450 (delete-char -1))))))))
1451
1451 (defun fill-individual-paragraphs-prefix (citation-regexp) 1452 (defun fill-individual-paragraphs-prefix (citation-regexp)
1452 (let* ((adaptive-fill-first-line-regexp ".*") 1453 (let* ((adaptive-fill-first-line-regexp ".*")
1453 (just-one-line-prefix 1454 (just-one-line-prefix
1454 ;; Accept any prefix rather than just the ones matched by 1455 ;; Accept any prefix rather than just the ones matched by
1455 ;; adaptive-fill-first-line-regexp. 1456 ;; adaptive-fill-first-line-regexp.