[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el |
Date: |
Tue, 09 Aug 2005 10:01:29 -0400 |
Index: emacs/lisp/textmodes/fill.el
diff -c emacs/lisp/textmodes/fill.el:1.180 emacs/lisp/textmodes/fill.el:1.181
*** emacs/lisp/textmodes/fill.el:1.180 Sat Aug 6 17:41:14 2005
--- emacs/lisp/textmodes/fill.el Tue Aug 9 14:01:29 2005
***************
*** 163,169 ****
;; This is quick, but loses when a tab follows the end of a sentence.
;; Actually, it is difficult to tell that from "Mr.\tSmith".
;; Blame the typist.
! (subst-char-in-region beg end ?\t ?\ )
(while (and (< (point) end)
(re-search-forward end-spc-re end t))
(delete-region
--- 163,169 ----
;; This is quick, but loses when a tab follows the end of a sentence.
;; Actually, it is difficult to tell that from "Mr.\tSmith".
;; Blame the typist.
! (subst-char-in-region beg end ?\t ?\s)
(while (and (< (point) end)
(re-search-forward end-spc-re end t))
(delete-region
***************
*** 282,288 ****
(string-match comment-start-skip
first-line-prefix)))
first-line-prefix
! (make-string (string-width first-line-prefix) ?\ ))))
;; But either way, reject it if it indicates the start
;; of a paragraph when text follows it.
(if (not (eq 0 (string-match paragraph-start
--- 282,288 ----
(string-match comment-start-skip
first-line-prefix)))
first-line-prefix
! (make-string (string-width first-line-prefix) ?\s))))
;; But either way, reject it if it indicates the start
;; of a paragraph when text follows it.
(if (not (eq 0 (string-match paragraph-start
***************
*** 312,318 ****
(backward-char 1)
(or (looking-at "[([{,A+,b+(B]")
;; Don't cut right after a single-letter word.
! (and (memq (preceding-char) '(?\t ?\ ))
(eq (char-syntax (following-char)) ?w)))))))
(defcustom fill-nobreak-predicate nil
--- 312,318 ----
(backward-char 1)
(or (looking-at "[([{,A+,b+(B]")
;; Don't cut right after a single-letter word.
! (and (memq (preceding-char) '(?\t ?\s))
(eq (char-syntax (following-char)) ?w)))))))
(defcustom fill-nobreak-predicate nil
***************
*** 439,448 ****
(sentence-end-without-space-list
(string-to-list sentence-end-without-space)))
(while (re-search-forward eol-double-space-re to t)
! (or (>= (point) to) (memq (char-before) '(?\t ?\ ))
(memq (char-after (match-beginning 0))
sentence-end-without-space-list)
! (insert-and-inherit ?\ ))))
(goto-char from)
(if enable-multibyte-characters
--- 439,448 ----
(sentence-end-without-space-list
(string-to-list sentence-end-without-space)))
(while (re-search-forward eol-double-space-re to t)
! (or (>= (point) to) (memq (char-before) '(?\t ?\s))
(memq (char-after (match-beginning 0))
sentence-end-without-space-list)
! (insert-and-inherit ?\s))))
(goto-char from)
(if enable-multibyte-characters
***************
*** 471,477 ****
(goto-char from)
(skip-chars-forward " \t")
;; Then change all newlines to spaces.
! (subst-char-in-region from to ?\n ?\ )
(if (and nosqueeze (not (eq justify 'full)))
nil
(canonically-space-region (or squeeze-after (point)) to)
--- 471,477 ----
(goto-char from)
(skip-chars-forward " \t")
;; Then change all newlines to spaces.
! (subst-char-in-region from to ?\n ?\s)
(if (and nosqueeze (not (eq justify 'full)))
nil
(canonically-space-region (or squeeze-after (point)) to)
***************
*** 830,839 ****
(if has-code-and-comment
(concat
(if (not indent-tabs-mode)
! (make-string (current-column) ?\ )
(concat
(make-string (/ (current-column) tab-width) ?\t)
! (make-string (% (current-column) tab-width) ?\ )))
(buffer-substring (point) comin))
(buffer-substring (line-beginning-position) comin))))
beg end)
--- 830,839 ----
(if has-code-and-comment
(concat
(if (not indent-tabs-mode)
! (make-string (current-column) ?\s)
(concat
(make-string (/ (current-column) tab-width) ?\t)
! (make-string (% (current-column) tab-width) ?\s)))
(buffer-substring (point) comin))
(buffer-substring (line-beginning-position) comin))))
beg end)
***************
*** 1223,1229 ****
(while (> count 0)
(skip-chars-forward " ")
(insert-and-inherit
! (make-string (/ curr-fracspace nspaces) ?\ ))
(search-forward " " nil t)
(setq count (1- count)
curr-fracspace
--- 1223,1229 ----
(while (> count 0)
(skip-chars-forward " ")
(insert-and-inherit
! (make-string (/ curr-fracspace nspaces) ?\s))
(search-forward " " nil t)
(setq count (1- count)
curr-fracspace
***************
*** 1282,1289 ****
When calling from a program, pass range to fill as first two arguments.
! Optional third and fourth arguments JUSTIFY and MAIL-FLAG:
! JUSTIFY to justify paragraphs (prefix arg),
When filling a mail message, pass a regexp for CITATION-REGEXP
which will match the prefix of a line which is a citation marker
plus whitespace, but no other kind of prefix.
--- 1282,1289 ----
When calling from a program, pass range to fill as first two arguments.
! Optional third and fourth arguments JUSTIFYP and CITATION-REGEXP:
! JUSTIFYP to justify paragraphs (prefix arg).
When filling a mail message, pass a regexp for CITATION-REGEXP
which will match the prefix of a line which is a citation marker
plus whitespace, but no other kind of prefix.