diff options
| author | Marcin Borkowski | 2018-01-24 10:32:40 +0100 |
|---|---|---|
| committer | Marcin Borkowski | 2018-01-24 10:32:40 +0100 |
| commit | 96de0503cd04f3cba7c4db94789b958e9775e2c6 (patch) | |
| tree | 86a459aa1c5e2739034c7a69e2d74a1e75ac7090 /lisp | |
| parent | 109da684c5124e22505917fe0255ca66f2a6bfc9 (diff) | |
| parent | 521470987b198fcadff294a8e3c700be21b1a15c (diff) | |
| download | emacs-96de0503cd04f3cba7c4db94789b958e9775e2c6.tar.gz emacs-96de0503cd04f3cba7c4db94789b958e9775e2c6.zip | |
Merge branch 'fix/bug-20871-cur'
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/textmodes/fill.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 7f9538fb569..08e975f2355 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -340,6 +340,18 @@ places." | |||
| 340 | (and (memq (preceding-char) '(?\t ?\s)) | 340 | (and (memq (preceding-char) '(?\t ?\s)) |
| 341 | (eq (char-syntax (following-char)) ?w))))))) | 341 | (eq (char-syntax (following-char)) ?w))))))) |
| 342 | 342 | ||
| 343 | (defun fill-polish-nobreak-p () | ||
| 344 | "Return nil if Polish style allows breaking the line at point. | ||
| 345 | This function may be used in the `fill-nobreak-predicate' hook. | ||
| 346 | It is almost the same as `fill-single-char-nobreak-p', with the | ||
| 347 | exception that it does not require the one-letter word to be | ||
| 348 | preceded by a space. This blocks line-breaking in cases like | ||
| 349 | \"(a jednak)\"." | ||
| 350 | (save-excursion | ||
| 351 | (skip-chars-backward " \t") | ||
| 352 | (backward-char 2) | ||
| 353 | (looking-at "[^[:alpha:]]\\cl"))) | ||
| 354 | |||
| 343 | (defun fill-single-char-nobreak-p () | 355 | (defun fill-single-char-nobreak-p () |
| 344 | "Return non-nil if a one-letter word is before point. | 356 | "Return non-nil if a one-letter word is before point. |
| 345 | This function is suitable for adding to the hook `fill-nobreak-predicate', | 357 | This function is suitable for adding to the hook `fill-nobreak-predicate', |