unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5326: 23.1; sgml-fill-nobreak docstring
@ 2010-01-05 23:18 Kevin Ryde
  2010-01-06  4:39 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ryde @ 2010-01-05 23:18 UTC (permalink / raw)
  To: bug-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

sgml-fill-nobreak might helpfully have a docstring to tell you want its
nobreaking condition is.  I don't think it would show up in customize or
anything as such, but C-h v fill-nobreak-predicate in sgml-mode shows it
and you can follow it from there to see what it does.

2010-01-05  Kevin Ryde  <user42@zip.com.au>

	* textmodes/sgml-mode.el (sgml-fill-nobreak): Turn comment into
	docstring.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sgml-mode.el.nobreak-docstring.diff --]
[-- Type: text/x-diff, Size: 987 bytes --]

--- sgml-mode.el.~1.146.~	2009-12-06 10:10:20.000000000 +1100
+++ sgml-mode.el	2010-01-03 16:33:19.000000000 +1100
@@ -1,7 +1,7 @@
 ;;; sgml-mode.el --- SGML- and HTML-editing modes -*- coding: utf-8 -*-
 
 ;; Copyright (C) 1992, 1995, 1996, 1998, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: James Clark <jjc@jclark.com>
 ;; Maintainer: FSF
@@ -417,7 +417,12 @@
 		  (format-mode-line mode-name))))))
 
 (defun sgml-fill-nobreak ()
-  ;; Don't break between a tag name and its first argument.
+  "Don't break between a tag name and its first argument.
+This function is designed for use in `fill-nobreak-predicate'.
+
+    <a href=\"some://where\" type=\"text/plain\">
+      ^                   ^
+      | no break here     | but still allowed here"
   (save-excursion
     (skip-chars-backward " \t")
     (and (not (zerop (skip-syntax-backward "w_")))

[-- Attachment #3: Type: text/plain, Size: 732 bytes --]



In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5)
 of 2009-09-14 on raven, modified by Debian
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

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

* bug#5326: 23.1; sgml-fill-nobreak docstring
  2010-01-05 23:18 bug#5326: 23.1; sgml-fill-nobreak docstring Kevin Ryde
@ 2010-01-06  4:39 ` Stefan Monnier
  2010-01-08 21:37   ` Kevin Ryde
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2010-01-06  4:39 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: 5326

> sgml-fill-nobreak might helpfully have a docstring to tell you want its
> nobreaking condition is.  I don't think it would show up in customize or
> anything as such, but C-h v fill-nobreak-predicate in sgml-mode shows it
> and you can follow it from there to see what it does.

> 2010-01-05  Kevin Ryde  <user42@zip.com.au>

> 	* textmodes/sgml-mode.el (sgml-fill-nobreak): Turn comment into
> 	docstring.

Feel free to install it,


        Stefan






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

* bug#5326: 23.1; sgml-fill-nobreak docstring
  2010-01-06  4:39 ` Stefan Monnier
@ 2010-01-08 21:37   ` Kevin Ryde
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2010-01-08 21:37 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5326

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> Feel free to install it,

If only I could!  Alas the new bizaar is unusable for a slow link.
I might withdraw my commit perms for the time being.






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

end of thread, other threads:[~2010-01-08 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-05 23:18 bug#5326: 23.1; sgml-fill-nobreak docstring Kevin Ryde
2010-01-06  4:39 ` Stefan Monnier
2010-01-08 21:37   ` Kevin Ryde

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).