From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] utils: Preserve makefile shell arguments during patch. Date: Thu, 28 Aug 2014 17:41:11 +0200 Message-ID: <87wq9saag8.fsf@gnu.org> References: <874mwydjwe.fsf@member.fsf.org> <87ha0wet48.fsf@gnu.org> <87lhq83c4s.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN1pC-0002du-9V for guix-devel@gnu.org; Thu, 28 Aug 2014 11:41:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN1p3-0006CQ-8c for guix-devel@gnu.org; Thu, 28 Aug 2014 11:41:22 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:49413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN1p3-0006CH-2g for guix-devel@gnu.org; Thu, 28 Aug 2014 11:41:13 -0400 In-Reply-To: <87lhq83c4s.fsf@gmail.com> (Eric Bavier's message of "Thu, 28 Aug 2014 09:46:43 -0500") 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: Eric Bavier Cc: guix-devel@gnu.org Eric Bavier skribis: > Ludovic Court=C3=A8s writes: > >>> (let* ((old (string-append dir shell)) >>> (new (or (find-shell shell) old))) >>> (unless (string=3D? new old) >>> (format (current-error-port) >>> "patch-makefile-SHELL: ~a: changing `SHELL' from `~a= ' to `~a'~%" >>> file old new)) >>> - (string-append "SHELL =3D " new "\n")))) >>> + (string-append "SHELL =3D " new " " args)))) >> >> Are you sure the \n is no longer needed? (I can never remember when it >> is matched and when it=E2=80=99s not.) > > It's no longer needed in this case, since the '.' also matches a > newline, so it will end up in 'args'.=20=20 Ah OK. Then please commit, with the long line wrapped. > BTW, this is contrary to the GNU Emacs Regular Expressions documentation > which states:: > > . (Period) > is a special character that matches any single character *except a > newline*... > > I'm not sure at what level the newline is being matched, whether in > substitute* or in Guile's regex library. Guile=E2=80=99s (ice-9 regex) builds on top of libc=E2=80=99s regexps, whic= h are POSIX extended regular expressions by default. Thanks, Ludo=E2=80=99.