From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.bugs Subject: bug#20871: 25.0.50; fill-single-char-nobreak-p does not recognize a single-letter word when it is preceded by an open paren Date: Mon, 22 Jun 2015 12:28:31 +0200 Message-ID: <87wpywhwa8.fsf@mbork.pl> References: <87y4jchwog.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1434969030 24994 80.91.229.3 (22 Jun 2015 10:30:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jun 2015 10:30:30 +0000 (UTC) To: 20871@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 22 12:30:18 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z6yzZ-0007Wg-LL for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2015 12:30:17 +0200 Original-Received: from localhost ([::1]:39165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6yzY-0003rN-R6 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2015 06:30:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6yzV-0003rH-6x for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 06:30:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6yzR-0000Dn-2X for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 06:30:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6yzQ-0000Dh-VD for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 06:30:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z6yzP-0003yc-FC for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 06:30:07 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marcin Borkowski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jun 2015 10:30:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20871 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143496894315196 (code B ref -1); Mon, 22 Jun 2015 10:30:06 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Jun 2015 10:29:03 +0000 Original-Received: from localhost ([127.0.0.1]:53889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z6yyN-0003x2-Ei for submit@debbugs.gnu.org; Mon, 22 Jun 2015 06:29:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54969) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z6yyK-0003wY-NT for submit@debbugs.gnu.org; Mon, 22 Jun 2015 06:29:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6yyE-0007Yu-D8 for submit@debbugs.gnu.org; Mon, 22 Jun 2015 06:28:55 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6yyE-0007Yo-0H for submit@debbugs.gnu.org; Mon, 22 Jun 2015 06:28:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6yyD-0003lC-39 for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 06:28:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6yy8-0007Wo-Vr for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 06:28:53 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:50996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6yy8-0007Wi-PG for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 06:28:48 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 693635F2043 for ; Mon, 22 Jun 2015 12:28:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZU2PE+MKKSbe for ; Mon, 22 Jun 2015 12:28:41 +0200 (CEST) Original-Received: from localhost (ipz217.internetdsl.tpnet.pl [79.190.154.217]) by mail.mojserwer.eu (Postfix) with ESMTPSA id D87EA5F2041 for ; Mon, 22 Jun 2015 12:28:40 +0200 (CEST) In-reply-to: <87y4jchwog.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104215 Archived-At: On 2015-06-22, at 12:19, Marcin Borkowski wrote: > Hello, > > today I found that fill-single-char-nobreak-p is just a bit too > simplistic. When point is after e.g. the string " (a", it returns nil > instead of t. I am not sure which characters should be added to the > regex, but at least the opening paren (and maybe bracket) should be > there, so I'd change the regex into [[:space:]][[(]*[[:alpha:]]. (Two > or more opening parens/brackets are unlikely, but when in doubt, I guess > it's better to return t than nil than the other way round.) > > Best regards, Just noticed that there is a hardcoded (backward-char 2), so it seems that adding a few characters to the regex is not enough. Maybe looking-back is the way to go (though it might slow filling down)? I don't know. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University