aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-01-27 21:50:16 -0500
committerGlenn Morris2014-01-27 21:50:16 -0500
commit793ffe819539d4f642631910598b9c8dc696ec38 (patch)
tree427e29742730ec5e9487a9795c4138ba8d93115b
parentafc123c7bfa0f8a88b52c1caa4f1b996e64fbe41 (diff)
downloademacs-793ffe819539d4f642631910598b9c8dc696ec38.tar.gz
emacs-793ffe819539d4f642631910598b9c8dc696ec38.zip
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.
-rw-r--r--doc/emacs/ChangeLog2
-rw-r--r--doc/emacs/text.texi7
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/textmodes/fill.el8
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 @@
12014-01-28 Glenn Morris <rgm@gnu.org> 12014-01-28 Glenn Morris <rgm@gnu.org>
2 2
3 * text.texi (Fill Commands): Mention fill-single-char-nobreak-p.
4
3 * indent.texi (Tab Stops): Updates for new tab-stop behavior. 5 * indent.texi (Tab Stops): Updates for new tab-stop behavior.
4 6
52014-01-27 Glenn Morris <rgm@gnu.org> 72014-01-27 Glenn Morris <rgm@gnu.org>
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}
562(@pxref{Hooks}). Each function in this hook is called with no 562(@pxref{Hooks}). Each function in this hook is called with no
563arguments, with point positioned where Emacs is considering breaking a 563arguments, with point positioned where Emacs is considering breaking a
564line. If a function returns a non-@code{nil} value, Emacs will not 564line. If a function returns a non-@code{nil} value, Emacs will not
565break the line there. Two functions you can use are 565break the line there. Functions you can use there include:
566@code{fill-single-word-nobreak-p} (don't break after the first word of 566@code{fill-single-word-nobreak-p} (don't break after the first word of
567a sentence or before the last) and @code{fill-french-nobreak-p} (don't 567a sentence or before the last); @code{fill-single-char-nobreak-p}
568break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}). 568(don't break after a one-letter word); and @code{fill-french-nobreak-p}
569(don't break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}).
569 570
570@node Fill Prefix 571@node Fill Prefix
571@subsection The Fill Prefix 572@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
280spacing. Like `just-one-space', it can handle or ignore newlines and 280spacing. Like `just-one-space', it can handle or ignore newlines and
281leave different number of spaces. 281leave different number of spaces.
282 282
283+++
283*** `fill-single-char-nobreak-p' prevents fill from breaking a line after 284*** `fill-single-char-nobreak-p' prevents fill from breaking a line after
284a 1-letter word, which is an error according to Polish and 285a one-letter word, which is an error according to some rules of typography.
285Czech typography rules. To globally enable this feature, evaluate: 286To use it, add it to the `fill-nobreak-predicate' hook.
286
287 (add-hook 'fill-nobreak-predicate 'fill-single-char-nobreak-p)
288 287
289+++ 288+++
290** Uniquify is enabled by default, with `post-forward-angle-brackets' style. 289** 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 @@
12014-01-28 Glenn Morris <rgm@gnu.org> 12014-01-28 Glenn Morris <rgm@gnu.org>
2 2
3 * textmodes/fill.el (fill-single-char-nobreak-p): Doc tweak.
4
3 * indent.el (tab-stop-list): Doc fix. Add :version. 5 * indent.el (tab-stop-list): Doc fix. Add :version.
4 6
5 * vc/pcvs.el (vc-editable-p, vc-checkout): Remove unused declarations. 7 * 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."
330 (eq (char-syntax (following-char)) ?w))))))) 330 (eq (char-syntax (following-char)) ?w)))))))
331 331
332(defun fill-single-char-nobreak-p () 332(defun fill-single-char-nobreak-p ()
333 "Return t if point is placed just after a 1-letter word. 333 "Return non-nil if a one-letter word is before point.
334This is used in `fill-nobreak-predicate' to prevent breaking line just 334This function is suitable for adding to the hook `fill-nobreak-predicate',
335after a 1-letter word (usually conjunction or preposition) which is 335to prevent the breaking of a line just after a one-letter word,
336considered composition error in Polish and Czech typography." 336which is an error according to some rules of typography."
337 (save-excursion 337 (save-excursion
338 (skip-chars-backward " \t") 338 (skip-chars-backward " \t")
339 (backward-char 2) 339 (backward-char 2)