Commit 793ffe81 authored by Glenn Morris's avatar Glenn Morris
Browse files

Doc for fill-single-char-nobreak-p

* doc/emacs/text.texi (Fill Commands): Mention fill-single-char-nobreak-p.

* lisp/textmodes/fill.el (fill-single-char-nobreak-p): Doc tweak.

* etc/NEWS: Related edit.
parent afc123c7
2014-01-28 Glenn Morris <>
* text.texi (Fill Commands): Mention fill-single-char-nobreak-p.
* indent.texi (Tab Stops): Updates for new tab-stop behavior.
2014-01-27 Glenn Morris <>
......@@ -562,10 +562,11 @@ customize the abnormal hook variable @code{fill-nobreak-predicate}
(@pxref{Hooks}). Each function in this hook is called with no
arguments, with point positioned where Emacs is considering breaking a
line. If a function returns a non-@code{nil} value, Emacs will not
break the line there. Two functions you can use are
break the line there. Functions you can use there include:
@code{fill-single-word-nobreak-p} (don't break after the first word of
a sentence or before the last) and @code{fill-french-nobreak-p} (don't
break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}).
a sentence or before the last); @code{fill-single-char-nobreak-p}
(don't break after a one-letter word); and @code{fill-french-nobreak-p}
(don't break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}).
@node Fill Prefix
@subsection The Fill Prefix
......@@ -280,11 +280,10 @@ having just one space, no spaces, or reverting to the original
spacing. Like `just-one-space', it can handle or ignore newlines and
leave different number of spaces.
*** `fill-single-char-nobreak-p' prevents fill from breaking a line after
a 1-letter word, which is an error according to Polish and
Czech typography rules. To globally enable this feature, evaluate:
(add-hook 'fill-nobreak-predicate 'fill-single-char-nobreak-p)
a one-letter word, which is an error according to some rules of typography.
To use it, add it to the `fill-nobreak-predicate' hook.
** Uniquify is enabled by default, with `post-forward-angle-brackets' style.
2014-01-28 Glenn Morris <>
* textmodes/fill.el (fill-single-char-nobreak-p): Doc tweak.
* indent.el (tab-stop-list): Doc fix. Add :version.
* vc/pcvs.el (vc-editable-p, vc-checkout): Remove unused declarations.
......@@ -330,10 +330,10 @@ places."
(eq (char-syntax (following-char)) ?w)))))))
(defun fill-single-char-nobreak-p ()
"Return t if point is placed just after a 1-letter word.
This is used in `fill-nobreak-predicate' to prevent breaking line just
after a 1-letter word (usually conjunction or preposition) which is
considered composition error in Polish and Czech typography."
"Return non-nil if a one-letter word is before point.
This function is suitable for adding to the hook `fill-nobreak-predicate',
to prevent the breaking of a line just after a one-letter word,
which is an error according to some rules of typography."
(skip-chars-backward " \t")
(backward-char 2)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment