From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: master 305dbc7 2/4: Move description of value to syntax-ppss function. Date: Wed, 30 Oct 2019 17:26:19 +0200 Message-ID: <7d102a3b-3a3e-b83f-038d-6edec9a1f49a@yandex.ru> References: <20191030121649.15369.13207@vcs0.savannah.gnu.org> <20191030121651.BFCF8204DF@vcs0.savannah.gnu.org> <87eeyutgwa.fsf@gnus.org> <333d1d46-ab79-5818-4367-b28ed915aff6@yandex.ru> <87a79itfzp.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="94386"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 30 16:27:12 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iPpsN-000OSX-Ny for ged-emacs-devel@m.gmane.org; Wed, 30 Oct 2019 16:27:11 +0100 Original-Received: from localhost ([::1]:41588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPpsL-0000Kg-UB for ged-emacs-devel@m.gmane.org; Wed, 30 Oct 2019 11:27:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43615) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPprg-0000Jx-3E for emacs-devel@gnu.org; Wed, 30 Oct 2019 11:26:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPprc-0007Us-Ku for emacs-devel@gnu.org; Wed, 30 Oct 2019 11:26:26 -0400 Original-Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:43144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iPprc-0007Nq-1N for emacs-devel@gnu.org; Wed, 30 Oct 2019 11:26:24 -0400 Original-Received: by mail-ed1-x533.google.com with SMTP id f25so2053118edw.10 for ; Wed, 30 Oct 2019 08:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=saLzV6JGll88th4gXN3mT8bGUZhap3PocIdMaqYrA0M=; b=IuG+7vRp3B0YwpzjRVD00gwMoMbFxl7h4rEBOjp4RALWPkg80UtDJPeXVHGxDYBNJL mwE36JOSRQRQPk1cmzCyZOhDlZBWezcsTPgpW/mYcFNYEhv7R3ZbgE/JaYxuwea+K1T1 9FQE14045MtQJeVyR/1NULis2zgZKWut6n0B19m4ZvxIVu6JYKQv1TXAv2ETE0Lx9Dpu +sY/p1vLCHBtQdff9HClp8fpWzTafDpcYMBUpSPL3fOufeT+VaIgaMRT/nZgWH3KrcB/ /Pb6RGyuFcFJSYJH2Hhi4Qm+yLxQ8dPAlzTg7eeaE3DNPjL9HSqUU5StJXBhf7aCKTtb riZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=saLzV6JGll88th4gXN3mT8bGUZhap3PocIdMaqYrA0M=; b=MSG1yYqTEx3osdp8WsZqLBZ7czHqzIflW3Z5gFD4A7CUts8bwyDd5Uzwawd3UJ+Tq8 6MXG6AJamiYLLX39EVRHw1Guz3ntPoGNrrY/a6jMrYrAwetqqjdAovEa7P2fwjY+tNlF Z9woRFvY8mFgcXpHJYsl8FJN9Q5I3Hv5kvRkJ/7tvZ2EnDO1XNgmciSJGc++s1a6gG6B tfugT0la0ZvpLmk6h0unnIGDTgQIB79u0k7QVLRlGatJZuPFuY3RQOiBtLGuV1540TJE N3DoPzTVWxF1bPJHuBFmvkl6xN9Q933JESyhOJByADDpOInnAGNsB3bdJR7mB0X69969 gOKA== X-Gm-Message-State: APjAAAVUEUfjb0abg9nWdsFwAvcgS3512AIQOB5qyVjM+o92M96c6JO9 QufRXcuApIrfSXIKsgBe5wvMew98FmY= X-Google-Smtp-Source: APXvYqzDc0nykhT0Y0V4cXdzVSu5f5M+PEv5Sw6B5hmPfXwUp/VSkUZ/QP/6CyYOv4ziPFRqSiQ+Fg== X-Received: by 2002:a17:906:1812:: with SMTP id v18mr98064eje.86.1572449181689; Wed, 30 Oct 2019 08:26:21 -0700 (PDT) Original-Received: from [192.168.0.140] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id n2sm1206ejr.36.2019.10.30.08.26.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2019 08:26:20 -0700 (PDT) In-Reply-To: <87a79itfzp.fsf@gnus.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::533 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241627 Archived-At: On 30.10.2019 17:22, Lars Ingebrigtsen wrote: > Yes, the doc string certainly implies that they can be relied upon if > you use that function instead. > > On the other hand, perhaps I shouldn't have moved it -- > parse-partial-sexp is used a lot, too. I was only seeing syntax-ppss > everywhere, but I see that it's used less than 2x as much. syntax-ppss is indeed the function that most consumers should call, but it's low-level enough that I never considered that to be a problem. > So perhaps that patch should be reverted anyway. That's what I would do. > Or have the list in > both functions. Or, even better, stop saying > > (if (nth 5 state) > (do-something-incomprehensible) > (do-something-else-incomprehensible)) > > everywhere and just add accessor functions already, so that the code > becomes marginally more readable. Because trying to make sense of it > now is just too hard, and it doesn't have to be. Someone should probably try to add that accessor thing, but also perf-test the result.