unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Change in fill-nobreak-predicate
@ 2005-02-05  0:43 Chong Yidong
  2005-02-05  2:02 ` Stefan Monnier
  2005-02-05 17:39 ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Chong Yidong @ 2005-02-05  0:43 UTC (permalink / raw)


In 21.3, the variable fill-nobreak-predicate stored a function symbol.
This was changed in CVS, long ago, into a hook:

2001-10-30  Stefan Monnier  <monnier@cs.yale.edu>

	* textmodes/fill.el (sentence-end-double-space)
	(sentence-end-without-period): Move to paragraphs.el.
	(fill-indent-according-to-mode): Change default to t.
	(fill-context-prefix): Simplify control-flow and use a more
	sophisticated merge that unifies both previous checks.
	(fill-single-word-nobreak-p, fill-french-nobreak-p): New funs.
	(fill-nobreak-predicate): Make it into a defcustom'd hook.

This breaks third-party code that relies on fill-nobreak-predicate (such
as longlines.el), but never mind; the problem is that the NEWS entry does
not give any indication of this:

** You can now customize fill-nobreak-predicate to control where
filling can break lines.  We provide two sample predicates,
fill-single-word-nobreak-p and fill-french-nobreak-p.

+++

This makes it sound like the only change was to make it customizable, when
in fact its data type has changed.

The entry in lispref/text.texi should also be corrected:

@defvar fill-nobreak-predicate
This variable gives major modes a way to specify not to break a line at
certain places.  Its value should be a function.  This function is
called during filling, with no arguments and with point located at the
place where a break is being considered.  If the function returns
non-@code{nil}, then the line won't be broken there.
@end defvar

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-02-05 17:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-05  0:43 Change in fill-nobreak-predicate Chong Yidong
2005-02-05  2:02 ` Stefan Monnier
2005-02-05  2:37   ` Chong Yidong
2005-02-05 17:39     ` Richard Stallman
2005-02-05 17:39 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).