From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 64e25cd: More robust NS hex colour string parsing Date: Sat, 13 Jun 2020 14:59:56 +0300 Message-ID: <83a71741mr.fsf@gnu.org> References: <20200608120746.30163.87810@vcs0.savannah.gnu.org> <20200608120747.80E8E20A2E@vcs0.savannah.gnu.org> <83r1uk429y.fsf@gnu.org> <3C92A091-F389-4179-B2F0-B3AA5ABD6CCE@acm.org> <83pna43xrl.fsf@gnu.org> <9259B4A6-F3CC-4243-9F08-2882993C9B2C@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="103828"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@gmail.com, emacs-devel@gnu.org To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 13 14:00:56 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jk4qG-000QxH-AL for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Jun 2020 14:00:56 +0200 Original-Received: from localhost ([::1]:52304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jk4qF-00019M-CR for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Jun 2020 08:00:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jk4pU-00081m-43 for emacs-devel@gnu.org; Sat, 13 Jun 2020 08:00:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55824) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jk4pT-0002jP-Oa; Sat, 13 Jun 2020 08:00:07 -0400 Original-Received: from [176.228.60.248] (port=3898 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jk4pR-0001CW-BP; Sat, 13 Jun 2020 08:00:06 -0400 In-Reply-To: <9259B4A6-F3CC-4243-9F08-2882993C9B2C@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 13 Jun 2020 12:17:09 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252159 Archived-At: > From: Mattias EngdegÄrd > Date: Sat, 13 Jun 2020 12:17:09 +0200 > Cc: pipcet@gmail.com, emacs-devel@gnu.org > > 12 juni 2020 kl. 21.11 skrev Eli Zaretskii : > > > The error checking aside, are > > the return values of the original code the same as of the proposed > > unified code? > > Returned values for well-formed input are identical That's good to know, thanks. > except the low bits in some cases on Windows (try "#123") I don't think I understand what I should try; please elaborate. > Malformed arguments are now consistently rejected. How exactly are they rejected? I see the return value of parse_color_spec, but what happens in its callers, and what happens on the Lisp levels when those callers are called? > > At least tty-color-standard-values seems to never return nil for an > > RGB spec, but now it will, right? Can its callers cope with such a > > return value? > > Not sure what you mean here. Mind giving a concrete example? The first two branches of the 'cond' would always return a list before your changes, but after your changes they could return nil if color-values-from-numeric-string (not the best name, btw) returns nil and the input is of one of the two forms parsed by those two branches.