From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Schenkel Subject: [PATCH] guix: Fix handling of periods by fill-paragraph. Date: Sun, 27 Jul 2014 00:01:08 +0200 Message-ID: <8738dndbkr.fsf@SIRIUS09.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBA1t-0007Mo-MY for guix-devel@gnu.org; Sat, 26 Jul 2014 18:01:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBA1s-0001ae-Rk for guix-devel@gnu.org; Sat, 26 Jul 2014 18:01:25 -0400 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:40176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBA1s-0001aI-K6 for guix-devel@gnu.org; Sat, 26 Jul 2014 18:01:24 -0400 Received: by mail-wg0-f45.google.com with SMTP id x12so5659552wgg.4 for ; Sat, 26 Jul 2014 15:01:23 -0700 (PDT) Received: from SIRIUS09 ([2a02:120b:c3f9:6f0:beae:c5ff:fe67:f79a]) by mx.google.com with ESMTPSA id m8sm28205590wjy.35.2014.07.26.15.01.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 26 Jul 2014 15:01:22 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel --=-=-= Content-Type: text/plain Hi. This is a fix for the bug #17468. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-guix-Fix-handling-of-periods-by-fill-paragraph.patch >From 9fc7a445ad0249c0f4824b5f5338aa9aa6c16237 Mon Sep 17 00:00:00 2001 From: Cyrill Schenkel Date: Sun, 27 Jul 2014 00:00:09 +0200 Subject: [PATCH] guix: Fix handling of periods by fill-paragraph. * guix/ui.scm (fill-paragraph): Two spaces after period and no spaces before newline. --- guix/ui.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 9112d55..d8b0109 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -395,7 +395,9 @@ converted to a space; sequences of more than one line break are preserved." (else (let ((chars (case newlines ((0) chars) - ((1) (cons #\space chars)) + ((1) + (append (make-list (if (eqv? (car chars) #\.) 2 1) + #\space) chars)) (else (append (make-list newlines #\newline) chars)))) (column (case newlines @@ -414,7 +416,10 @@ converted to a space; sequences of more than one line break are preserved." 0 ,(if (null? after) before - (append before (cons #\newline (cdr after))))) + (append before + (cons #\newline + (drop-while (cut eqv? #\space <>) + after))))) `(,column 0 ,chars))) ; unbreakable `(,column 0 ,chars))))))))) -- 2.0.0 --=-=-=--