From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Predicate for true lists Date: Wed, 10 Apr 2019 05:32:47 +0300 Message-ID: <835zrm7fow.fsf@gnu.org> 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> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="15184"; mail-complaints-to="usenet@blaine.gmane.org" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: "Basil L. Contovounesios" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 10 04:33:24 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 1hE33E-0003rV-B4 for ged-emacs-devel@m.gmane.org; Wed, 10 Apr 2019 04:33:24 +0200 Original-Received: from localhost ([127.0.0.1]:52311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hE33D-0003wH-AG for ged-emacs-devel@m.gmane.org; Tue, 09 Apr 2019 22:33:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hE32f-0003wC-4q for emacs-devel@gnu.org; Tue, 09 Apr 2019 22:32:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hE32e-0004EO-9z; Tue, 09 Apr 2019 22:32:48 -0400 Original-Received: from [176.228.60.248] (port=1724 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hE32d-0001OX-L0; Tue, 09 Apr 2019 22:32:48 -0400 In-reply-to: <875zrn9bum.fsf@tcd.ie> (contovob@tcd.ie) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:235187 Archived-At: > From: "Basil L. Contovounesios" > Date: Tue, 09 Apr 2019 21:12:49 +0100 > Cc: emacs-devel@gnu.org > > 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. > > - 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.