From 793ffe819539d4f642631910598b9c8dc696ec38 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 27 Jan 2014 21:50:16 -0500 Subject: [PATCH] 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. --- doc/emacs/ChangeLog | 2 ++ doc/emacs/text.texi | 7 ++++--- etc/NEWS | 7 +++---- lisp/ChangeLog | 2 ++ lisp/textmodes/fill.el | 8 ++++---- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index ba6430c4826..9cc901b87a2 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,5 +1,7 @@ 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 diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 4d19ddbf1a6..1d30740467e 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -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 diff --git a/etc/NEWS b/etc/NEWS index 3a08223e269..546da03d699 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a9a5e6eb3b0..fd0d60923e9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 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. diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 35cc5320250..dac74e758fa 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -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." (save-excursion (skip-chars-backward " \t") (backward-char 2) -- 2.39.2