aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2005-08-09 14:05:24 +0000
committerJuanma Barranquero2005-08-09 14:05:24 +0000
commit8ad8316c3eb56952e12b682b6cedce95210a8da1 (patch)
tree38fffb7176a08da79d010793d734da753c14e47c
parent6f2b20a2fa4824b64c400cfdeec344d880537b1d (diff)
downloademacs-8ad8316c3eb56952e12b682b6cedce95210a8da1.tar.gz
emacs-8ad8316c3eb56952e12b682b6cedce95210a8da1.zip
(fill-nonuniform-paragraphs): Improve argument/docstring consistency.
(canonically-space-region, fill-context-prefix, fill-french-nobreak-p, fill-delete-newlines, fill-comment-paragraph, justify-current-line): "?\ " -> "?\s".
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/textmodes/fill.el22
2 files changed, 24 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1fa27e44974..817bee01c17 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12005-08-09 Juanma Barranquero <lekktu@gmail.com>
2
3 * textmodes/fill.el (canonically-space-region)
4 (fill-context-prefix, fill-french-nobreak-p)
5 (fill-delete-newlines, fill-comment-paragraph)
6 (justify-current-line): "?\ " -> "?\s".
7
82005-08-09 Ben North <ben@redfrontdoor.org> (tiny change)
9
10 * textmodes/fill.el (fill-nonuniform-paragraphs):
11 Improve argument/docstring consistency.
12
12005-08-09 Richard M. Stallman <rms@gnu.org> 132005-08-09 Richard M. Stallman <rms@gnu.org>
2 14
3 * files.el (find-file-noselect): Don't call set-buffer-major-mode. 15 * files.el (find-file-noselect): Don't call set-buffer-major-mode.
@@ -8,7 +20,7 @@
8 20
92005-08-09 Magnus Henoch <mange@freemail.hu> 212005-08-09 Magnus Henoch <mange@freemail.hu>
10 22
11 * textmodes/ispell.el (aspell-have-dictionaries): New variable. 23 * textmodes/ispell.el (aspell-have-dictionaries): New variable.
12 (aspell-find-dictionaries): New command. 24 (aspell-find-dictionaries): New command.
13 (aspell-data-dir): New variable. 25 (aspell-data-dir): New variable.
14 (aspell-find-data-dir): New function. 26 (aspell-find-data-dir): New function.
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index d77daaeed39..11ddfc0e967 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -163,7 +163,7 @@ Remove indentation from each line."
163 ;; This is quick, but loses when a tab follows the end of a sentence. 163 ;; This is quick, but loses when a tab follows the end of a sentence.
164 ;; Actually, it is difficult to tell that from "Mr.\tSmith". 164 ;; Actually, it is difficult to tell that from "Mr.\tSmith".
165 ;; Blame the typist. 165 ;; Blame the typist.
166 (subst-char-in-region beg end ?\t ?\ ) 166 (subst-char-in-region beg end ?\t ?\s)
167 (while (and (< (point) end) 167 (while (and (< (point) end)
168 (re-search-forward end-spc-re end t)) 168 (re-search-forward end-spc-re end t))
169 (delete-region 169 (delete-region
@@ -282,7 +282,7 @@ act as a paragraph-separator."
282 (string-match comment-start-skip 282 (string-match comment-start-skip
283 first-line-prefix))) 283 first-line-prefix)))
284 first-line-prefix 284 first-line-prefix
285 (make-string (string-width first-line-prefix) ?\ )))) 285 (make-string (string-width first-line-prefix) ?\s))))
286 ;; But either way, reject it if it indicates the start 286 ;; But either way, reject it if it indicates the start
287 ;; of a paragraph when text follows it. 287 ;; of a paragraph when text follows it.
288 (if (not (eq 0 (string-match paragraph-start 288 (if (not (eq 0 (string-match paragraph-start
@@ -312,7 +312,7 @@ places."
312 (backward-char 1) 312 (backward-char 1)
313 (or (looking-at "[([{,A+,b+(B]") 313 (or (looking-at "[([{,A+,b+(B]")
314 ;; Don't cut right after a single-letter word. 314 ;; Don't cut right after a single-letter word.
315 (and (memq (preceding-char) '(?\t ?\ )) 315 (and (memq (preceding-char) '(?\t ?\s))
316 (eq (char-syntax (following-char)) ?w))))))) 316 (eq (char-syntax (following-char)) ?w)))))))
317 317
318(defcustom fill-nobreak-predicate nil 318(defcustom fill-nobreak-predicate nil
@@ -439,10 +439,10 @@ Point is moved to just past the fill prefix on the first line."
439 (sentence-end-without-space-list 439 (sentence-end-without-space-list
440 (string-to-list sentence-end-without-space))) 440 (string-to-list sentence-end-without-space)))
441 (while (re-search-forward eol-double-space-re to t) 441 (while (re-search-forward eol-double-space-re to t)
442 (or (>= (point) to) (memq (char-before) '(?\t ?\ )) 442 (or (>= (point) to) (memq (char-before) '(?\t ?\s))
443 (memq (char-after (match-beginning 0)) 443 (memq (char-after (match-beginning 0))
444 sentence-end-without-space-list) 444 sentence-end-without-space-list)
445 (insert-and-inherit ?\ )))) 445 (insert-and-inherit ?\s))))
446 446
447 (goto-char from) 447 (goto-char from)
448 (if enable-multibyte-characters 448 (if enable-multibyte-characters
@@ -471,7 +471,7 @@ Point is moved to just past the fill prefix on the first line."
471 (goto-char from) 471 (goto-char from)
472 (skip-chars-forward " \t") 472 (skip-chars-forward " \t")
473 ;; Then change all newlines to spaces. 473 ;; Then change all newlines to spaces.
474 (subst-char-in-region from to ?\n ?\ ) 474 (subst-char-in-region from to ?\n ?\s)
475 (if (and nosqueeze (not (eq justify 'full))) 475 (if (and nosqueeze (not (eq justify 'full)))
476 nil 476 nil
477 (canonically-space-region (or squeeze-after (point)) to) 477 (canonically-space-region (or squeeze-after (point)) to)
@@ -830,10 +830,10 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'."
830 (if has-code-and-comment 830 (if has-code-and-comment
831 (concat 831 (concat
832 (if (not indent-tabs-mode) 832 (if (not indent-tabs-mode)
833 (make-string (current-column) ?\ ) 833 (make-string (current-column) ?\s)
834 (concat 834 (concat
835 (make-string (/ (current-column) tab-width) ?\t) 835 (make-string (/ (current-column) tab-width) ?\t)
836 (make-string (% (current-column) tab-width) ?\ ))) 836 (make-string (% (current-column) tab-width) ?\s)))
837 (buffer-substring (point) comin)) 837 (buffer-substring (point) comin))
838 (buffer-substring (line-beginning-position) comin)))) 838 (buffer-substring (line-beginning-position) comin))))
839 beg end) 839 beg end)
@@ -1223,7 +1223,7 @@ otherwise it is made canonical."
1223 (while (> count 0) 1223 (while (> count 0)
1224 (skip-chars-forward " ") 1224 (skip-chars-forward " ")
1225 (insert-and-inherit 1225 (insert-and-inherit
1226 (make-string (/ curr-fracspace nspaces) ?\ )) 1226 (make-string (/ curr-fracspace nspaces) ?\s))
1227 (search-forward " " nil t) 1227 (search-forward " " nil t)
1228 (setq count (1- count) 1228 (setq count (1- count)
1229 curr-fracspace 1229 curr-fracspace
@@ -1282,8 +1282,8 @@ in the paragraph.
1282 1282
1283When calling from a program, pass range to fill as first two arguments. 1283When calling from a program, pass range to fill as first two arguments.
1284 1284
1285Optional third and fourth arguments JUSTIFY and MAIL-FLAG: 1285Optional third and fourth arguments JUSTIFYP and CITATION-REGEXP:
1286JUSTIFY to justify paragraphs (prefix arg), 1286JUSTIFYP to justify paragraphs (prefix arg).
1287When filling a mail message, pass a regexp for CITATION-REGEXP 1287When filling a mail message, pass a regexp for CITATION-REGEXP
1288which will match the prefix of a line which is a citation marker 1288which will match the prefix of a line which is a citation marker
1289plus whitespace, but no other kind of prefix. 1289plus whitespace, but no other kind of prefix.