unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Chong Yidong" <cyd@stupidchicken.com>
Subject: Change in fill-nobreak-predicate
Date: Fri, 4 Feb 2005 19:43:55 -0500 (EST)	[thread overview]
Message-ID: <1066.219.74.2.152.1107564235.squirrel@219.74.2.152> (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

             reply	other threads:[~2005-02-05  0:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-05  0:43 Chong Yidong [this message]
2005-02-05  2:02 ` Change in fill-nobreak-predicate Stefan Monnier
2005-02-05  2:37   ` Chong Yidong
2005-02-05 17:39     ` Richard Stallman
2005-02-05 17:39 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1066.219.74.2.152.1107564235.squirrel@219.74.2.152 \
    --to=cyd@stupidchicken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).