all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lawrence Mitchell <wence@gmx.li>
To: bug-gnu-emacs@gnu.org
Subject: bug#7751: 24.0.50; `fill-paragraph' on doc string with colons
Date: Tue, 28 Dec 2010 21:36:07 +0000	[thread overview]
Message-ID: <m3mxnpoa0o.fsf@gmx.li> (raw)
In-Reply-To: <3F4673E9CCED46A0BD9BA6B9BDF5DF8D@us.oracle.com>

Drew Adams wrote:
> This is a regression introduced in Emacs 22.1.  There is no such problem
> in Emacs 20 or 21.

[...]

> The same problem occurs if you change "allowed:" to "allowed.",
> "allowed!", "allowed?", "allowed,", or just "allowed", and no matter how
> much space you leave after it.  The same problem occurs if you remove
> "allowed:" altogether, i.e., with "The usual menu keywords are :enable,
> ...".

Here's an even more minimal test-case:

emacs -Q

(setq emacs-lisp-docstring-fill-column 30)
(insert "\"a word, another word and more :bar\"")

M-q

gives a break of:

| a word, another word and
| more :bar

whereas one would expect

| a word, another word and more
| :bar


The problem appears to be in the regexp used to define
paragraph-start in lisp-fill-paragraph:

...
      (let ((paragraph-start (concat paragraph-start
				     "\\|\\s-*\\([(;:\"]\\|`(\\|#'(\\)"))
...

Removing the colon leads to "expected" line breaking.

FWIW, the colon was introduced by this commit:

commit cd3f5084abdd59a8392cedee90ddbaa096d61d55
Author: Dave Love <fx@gnu.org>
Date:   Wed Mar 18 16:02:37 1998 +0000

    (lisp-fill-paragraph): Adjust
    paragraph-start in default filling case so that filling doc
    strings works.

Cheers,

Lawrence
-- 
Lawrence Mitchell <wence@gmx.li>






  reply	other threads:[~2010-12-28 21:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28 20:45 bug#7751: 24.0.50; `fill-paragraph' on doc string with colons Drew Adams
2010-12-28 21:36 ` Lawrence Mitchell [this message]
2012-02-17 12:55   ` Lawrence Mitchell
2012-02-17 14:13     ` Chong Yidong
2012-02-17 14:55       ` Drew Adams
2012-09-17  0:15         ` Drew Adams
2016-04-28 10:05   ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=m3mxnpoa0o.fsf@gmx.li \
    --to=wence@gmx.li \
    --cc=bug-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.