From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeremy Bryant via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66863: [PATCH] Add two docstrings in cl-macs.el Date: Tue, 31 Oct 2023 22:36:57 +0000 Message-ID: <87bkcexvoy.fsf@jeremybryant.net> Reply-To: Jeremy Bryant Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26450"; mail-complaints-to="usenet@ciao.gmane.io" To: 66863@debbugs.gnu.org, monnier@iro.umontreal.ca Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 31 23:41:58 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qxxQs-0006eI-2J for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Oct 2023 23:41:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxxQQ-0005I3-Cc; Tue, 31 Oct 2023 18:41:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxxQO-0005Hc-P9 for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2023 18:41:28 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qxxQO-0003FF-H4 for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2023 18:41:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qxxQw-0006zt-6i for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2023 18:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jeremy Bryant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Oct 2023 22:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66863 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, Stefan Monnier Original-Received: via spool by submit@debbugs.gnu.org id=B.169879207426816 (code B ref -1); Tue, 31 Oct 2023 22:42:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Oct 2023 22:41:14 +0000 Original-Received: from localhost ([127.0.0.1]:49466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxxQ9-0006yS-Qz for submit@debbugs.gnu.org; Tue, 31 Oct 2023 18:41:14 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:36362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxxQ6-0006y9-3m for submit@debbugs.gnu.org; Tue, 31 Oct 2023 18:41:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxxPS-00052Z-FK for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2023 18:40:30 -0400 Original-Received: from out-189.mta0.migadu.com ([2001:41d0:1004:224b::bd]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxxPP-00036m-RU for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2023 18:40:30 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1698792017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=K1JsJqCAG2Assj7+YijOR8mXjArz27vJJl35W6I2nNU=; b=Qsw5HxXnFHsbBXcJjfPYMMuRuRMvmAvSOkZf8H1+WP5svFbxhEmIW778NyMkkwjQ1EfN54 XWXWhPN36lvU4xRglxa4s8bgMT/BbGZjH85+rooZshnWxPwzPWAysZch0mlxIVskjSD2I5 HjfKAuVNZ3pemc6tCD+7K6O8mE7pGdD/LErI5WWPtuB5J4JXhSoe5tcz0LMqapq3z4BuNq Yl0boBBbfkP2VkqGl8P+2Fq0ewklMumvbAXnOS8dq6TyAA59BfkMjiw9mk3kN1flo7Nvzm abWgYFf0TvLCSatPe6VnyNFmzOSme2gjLzjj+iyEqzz82OyX4tidxxaGNDJnSQ== X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::bd; envelope-from=jb@jeremybryant.net; helo=out-189.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273576 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Hi Emacs maintainers, Here is a proposed patch with two docstrings added to cl-macs.el where there were none previously. In particular, from previous changes, I assume that Stefan you may be familiar with this area? I look forward to your feedback. Best Jeremy --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-two-docstrings-in-cl-macs.el.patch >From 9a0d8649511377a160f410fd73f74558f4a8e9dc Mon Sep 17 00:00:00 2001 From: Jeremy Bryant Date: Tue, 31 Oct 2023 22:24:20 +0000 Subject: [PATCH] Add two docstrings in cl-macs.el * lisp/emacs-lisp/cl-macs.el (cl--simple-exprs-p) (cl--const-expr-p): Add docstrings. --- lisp/emacs-lisp/cl-macs.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 43207ce7026..fd19bca60d9 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -101,6 +101,7 @@ cl--simple-expr-p (and (> size 0) (1- size)))) (defun cl--simple-exprs-p (xs) + "Check if no side effects, and executes quickly, for each element of list XS." (while (and xs (cl--simple-expr-p (car xs))) (setq xs (cdr xs))) (not xs)) @@ -118,6 +119,7 @@ cl--safe-expr-p ;;; Check if constant (i.e., no side effects or dependencies). (defun cl--const-expr-p (x) + "Check if X is constant (i.e., no side effects or dependencies)." (cond ((consp x) (or (eq (car x) 'quote) (and (memq (car x) '(function cl-function)) -- 2.40.1 --=-=-=--