]> git.eshelyaron.com Git - emacs.git/commitdiff
Doc for fill-single-char-nobreak-p
authorGlenn Morris <rgm@gnu.org>
Tue, 28 Jan 2014 02:50:16 +0000 (21:50 -0500)
committerGlenn Morris <rgm@gnu.org>
Tue, 28 Jan 2014 02:50:16 +0000 (21:50 -0500)
* 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
doc/emacs/text.texi
etc/NEWS
lisp/ChangeLog
lisp/textmodes/fill.el

index ba6430c482667ce233dc4cb28aa1a3fddb617ded..9cc901b87a2b60271652178310df32679e4040a2 100644 (file)
@@ -1,5 +1,7 @@
 2014-01-28  Glenn Morris  <rgm@gnu.org>
 
+       * 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  <rgm@gnu.org>
index 4d19ddbf1a6231102d7dc85aadc0a487f98000be..1d30740467e835969c1d8c315dfcc2560781e339 100644 (file)
@@ -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
index 3a08223e2690debd319d266574e0e63d1e73fdf9..546da03d69985120c851515a1fad9d9d571b0a7e 100644 (file)
--- 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.
index a9a5e6eb3b0e66bed52d22afc7ab8a50d195c763..fd0d60923e9df2694d76aaf61ebb07a7b1593b9b 100644 (file)
@@ -1,5 +1,7 @@
 2014-01-28  Glenn Morris  <rgm@gnu.org>
 
+       * 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.
index 35cc5320250a2a2f1fb327a4684f84ae740130ff..dac74e758fa19a7eed4201014ec2a549884adae7 100644 (file)
@@ -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)