diff options
| author | Juri Linkov | 2005-12-30 05:59:16 +0000 |
|---|---|---|
| committer | Juri Linkov | 2005-12-30 05:59:16 +0000 |
| commit | 74f36ff05e066416c196b01e253f5652594879dd (patch) | |
| tree | e4aaa49ee544cbd70f7e8e9b79b1e00dbf6ec156 | |
| parent | 2122c750912845e57de82470dd72627dd66744d9 (diff) | |
| download | emacs-74f36ff05e066416c196b01e253f5652594879dd.tar.gz emacs-74f36ff05e066416c196b01e253f5652594879dd.zip | |
(fill-single-word-nobreak-p): Use `sentence-end'.
| -rw-r--r-- | lisp/textmodes/fill.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index ce95c6f026f..48defb7d786 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -291,12 +291,13 @@ act as a paragraph-separator." | |||
| 291 | 291 | ||
| 292 | (defun fill-single-word-nobreak-p () | 292 | (defun fill-single-word-nobreak-p () |
| 293 | "Don't break a line after the first or before the last word of a sentence." | 293 | "Don't break a line after the first or before the last word of a sentence." |
| 294 | (or (looking-at "[ \t]*\\sw+[ \t]*[.?!:][ \t]*$") | 294 | (or (looking-at (concat "[ \t]*\\sw+" "\\(?:" (sentence-end) "\\)")) |
| 295 | (save-excursion | 295 | (save-excursion |
| 296 | (skip-chars-backward " \t") | 296 | (skip-chars-backward " \t") |
| 297 | (and (/= (skip-syntax-backward "w") 0) | 297 | (and (/= (skip-syntax-backward "w") 0) |
| 298 | (/= (skip-chars-backward " \t") 0) | 298 | (/= (skip-chars-backward " \t") 0) |
| 299 | (/= (skip-chars-backward ".?!:") 0))))) | 299 | (/= (skip-chars-backward ".?!:") 0) |
| 300 | (looking-at (sentence-end)))))) | ||
| 300 | 301 | ||
| 301 | (defun fill-french-nobreak-p () | 302 | (defun fill-french-nobreak-p () |
| 302 | "Return nil if French style allows breaking the line at point. | 303 | "Return nil if French style allows breaking the line at point. |