From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.devel Subject: Re: Predicate for true lists Date: Wed, 10 Apr 2019 09:16:04 -0500 Message-ID: <878swivtcr.fsf@gmail.com> References: <87fu3vdjjk.fsf@tcd.ie> <87bmcqhhsf.fsf@tcd.ie> <87in6xgtpb.fsf@tcd.ie> <2af892df-26cb-60b2-4fd8-067fcb3d32e9@cs.ucla.edu> <87r2kh9uwx.fsf@tcd.ie> <83h8lcnbxb.fsf@gnu.org> <87sh4s9poo.fsf@tcd.ie> <87k1q49p0i.fsf@tcd.ie> <87efgbbq2p.fsf@tcd.ie> <87a7gz8hp2.fsf@tcd.ie> <875zrn9bum.fsf@tcd.ie> <835zrm7fow.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="51725"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: "Basil L. Contovounesios" , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 10 16:24:00 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEE8t-000DIi-5Q for ged-emacs-devel@m.gmane.org; Wed, 10 Apr 2019 16:23:59 +0200 Original-Received: from localhost ([127.0.0.1]:60582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEE8r-0001gi-Tn for ged-emacs-devel@m.gmane.org; Wed, 10 Apr 2019 10:23:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEE1a-000055-9L for emacs-devel@gnu.org; Wed, 10 Apr 2019 10:16:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEE1S-0002og-P1 for emacs-devel@gnu.org; Wed, 10 Apr 2019 10:16:22 -0400 Original-Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:38584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hEE1L-0002h0-Us for emacs-devel@gnu.org; Wed, 10 Apr 2019 10:16:12 -0400 Original-Received: by mail-oi1-x22a.google.com with SMTP id a6so1885740oie.5 for ; Wed, 10 Apr 2019 07:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=utexas-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=SMFd77fI1sYj3orQMW58I1G0ekO3+0GFoZWciZJvNSA=; b=q/qc768bK/y7iBrhcJrdcKe28JKnGvPqrT9s7UCnrBKeG1+ipe4Or/u4kfHoLEjgTg +Aoi36nIzhDABAw+GFcy3zjpLuqtE0tXATd+TLCgVsQ8cKs3ycn1hIIq1oOXcSraWM1T m03HAo99vEnadWfgSER9ylodpkCVgs/gv6Qtjfc/BIAEh8CG0o5rbKX1kXz50UU+3z4R 4b3jI35Zs9l1BKP4N6EP2EKc9+JIkGC7Chn/OOW/i+PTVWmW/eUjFtWkG2KonKWGEzAh YDMhUEKk+2fSr6W6QiZHJiRxQv4htzYQpt1PXP2dJmuZwrB36SgERBJkQ4SenlXDGy2+ hSeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=SMFd77fI1sYj3orQMW58I1G0ekO3+0GFoZWciZJvNSA=; b=frb6nr2DouywfsH99egJMqBj+GogP81LZuu+gg2wfhI2GacHsbPhbBNJ3+hOGF80Pn tE70wjLsViV72iGbNM9G+LuvmitaQrJQxFsus9Fg1SORPJX5gDxx82a8dzm//H9WD0ns XEVcpAteXAQ7+OnOdRBEMvja6mRxshf/RUMilN2d3b2l6/hgKv6Rmx8O45L39cGFCB0M sWzd5gek1ChHwUCVbHsePjazk+Kyf0qR4hG+oXMGe9/6tQhOuGFx4uMbwDGA5rWaI3/M Kjcv5idU/QafCx9tyPylk9JenKe+/gVvfmfYKe+vcAI+BqnCkAgSaRJt9gL1DgTn7/Kz 6Ixg== X-Gm-Message-State: APjAAAWeooYpbGRSdGUKLaSCBvSawJ/m+7AFKOZhr4fN0yI564y9mX/9 1sFqG/jiL961F9Yg6g/F2snZoBle8rE= X-Google-Smtp-Source: APXvYqyVB0xBi04bcDOOko3L0CzuDtAXrOGMerUgLNvfkY5QRu5qzBJBMA2U3cgl5dAZV8hsJV3ViA== X-Received: by 2002:aca:bbc3:: with SMTP id l186mr2889202oif.23.1554905767660; Wed, 10 Apr 2019 07:16:07 -0700 (PDT) Original-Received: from mars (nat-128-62-60-196.public.utexas.edu. [128.62.60.196]) by smtp.gmail.com with ESMTPSA id b140sm15190595oih.57.2019.04.10.07.16.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Apr 2019 07:16:06 -0700 (PDT) X-Google-Original-From: Alex Branham In-Reply-To: <835zrm7fow.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 10 Apr 2019 05:32:47 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::22a X-Mailman-Approved-At: Wed, 10 Apr 2019 10:23:18 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:235209 Archived-At: On Wed 10 Apr 2019 at 05:32, Eli Zaretskii wrote: >> From: "Basil L. Contovounesios" >> Date: Tue, 09 Apr 2019 21:12:49 +0100 >> Cc: emacs-devel@gnu.org >>=20 >> diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi >> index 8ebe47d9ad..826818c380 100644 >> --- a/doc/lispref/internals.texi >> +++ b/doc/lispref/internals.texi >> @@ -1031,10 +1031,13 @@ Writing Emacs Primitives >> @file{lisp.h} contains the definitions for some important macros and >> functions. >>=20=20 >> - If you define a function which is side-effect free, update the code >> -in @file{byte-opt.el} that binds @code{side-effect-free-fns} and >> -@code{side-effect-and-error-free-fns} so that the compiler optimizer >> -knows about it. >> + If you define a function which is side-effect free, give it a >> +non-@code{nil} @code{side-effect-free} declaration (@pxref{Declare >> +Form}) or function property (@pxref{Symbol Plists}) so that the >> +compiler optimizer knows about it. Alternatively, you can update the >> +code in @file{byte-opt.el} that binds @code{side-effect-free-fns} and >> +@code{side-effect-and-error-free-fns}, but this approach is less >> +modular and no longer encouraged. > > This should have a @cindex entry for "side-effect-free" and other > symbols referenced here. Bonus points for adding some minimal > explanation what does "side-effect free function" mean. > > Thanks. Isn't this in direct contradiction with (info "(elisp) Standard Properties") which states that side-effect-free should not be set?: =E2=80=98side-effect-free=E2=80=99 A non-=E2=80=98nil=E2=80=99 value indicates that the named function is= free of side-effects, for determining function safety (*note Function Safety::) as well as for byte compiler optimizations. Do not set it. Thanks, Alex