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#66928: [PATCH 2/2] Update names to match the docstring Date: Sat, 04 Nov 2023 12:49:27 +0000 Message-ID: <87cywpwuid.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="14225"; mail-complaints-to="usenet@ciao.gmane.io" To: 66928@debbugs.gnu.org, monnier@iro.umontreal.ca Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 04 13:53:44 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 1qzG9o-0003Wh-5T for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Nov 2023 13:53:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzG9Y-000453-HD; Sat, 04 Nov 2023 08:53:28 -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 1qzG9W-00044d-R4 for bug-gnu-emacs@gnu.org; Sat, 04 Nov 2023 08:53:26 -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 1qzG9W-0004gq-J7 for bug-gnu-emacs@gnu.org; Sat, 04 Nov 2023 08:53:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzGA6-00018n-8w for bug-gnu-emacs@gnu.org; Sat, 04 Nov 2023 08:54: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: Sat, 04 Nov 2023 12:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66928 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.16991023984318 (code B ref -1); Sat, 04 Nov 2023 12:54:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Nov 2023 12:53:18 +0000 Original-Received: from localhost ([127.0.0.1]:33162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzG9O-00017Z-AD for submit@debbugs.gnu.org; Sat, 04 Nov 2023 08:53:18 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:45414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzG9M-00017M-4c for submit@debbugs.gnu.org; Sat, 04 Nov 2023 08:53:16 -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 1qzG8g-0003ur-BH for bug-gnu-emacs@gnu.org; Sat, 04 Nov 2023 08:52:34 -0400 Original-Received: from out-180.mta0.migadu.com ([2001:41d0:1004:224b::b4]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qzG8e-0004YC-5d for bug-gnu-emacs@gnu.org; Sat, 04 Nov 2023 08:52:34 -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=1699102349; 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=sr2cc/VV2D1PV3T3nxppi72doZ8+ibdqnd42HlApviQ=; b=Y3In/p6GriUaj3RGIcpXFN5tOhmuznHxP1hDX9rROz6IGtuanyUDnGUxZZQPHLc0BT1u9i hF7kLPI6gALKXDojhCGs/NXwb4438lb4fU8NSTxiRxW63tQne3XScnthm/MbM9Y5g+2VoX C8jOECaCJl/wfMtdMj6H3MTvJec3plQaif0IIM68oUIJzTP/dOEi7lEsM6wq6MKgWMJ5Mu lLFlDu2RztI0ZKbTE6keGGCUkfqPhOUSVE6CkQSUwHP1gJKMMMYRGpZj0seroZxah+hQha 0EGf7oqg+9aSmK8/Mcia514PFO4qJCtHUhekcW8nsuQVRT32Ytw1/zEHxc4W+w== X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::b4; envelope-from=jb@jeremybryant.net; helo=out-180.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:273778 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Hello I noticed that for the function below the docstring doesn't match the arg names. I've chosen to keep the docstring on the basis that it may be what has been the most visible for a time, and update the names in the code. In general, is it TRT? Do we have a convention to keep names or the docstring. Please let me know if this patch is useful in its current form or a change is needed. thanks Jeremy --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0002-Update-names-to-match-the-docstring.patch >From 927b8ef441c1367ba1fcf08172f3eb6b739eddab Mon Sep 17 00:00:00 2001 From: Jeremy Bryant Date: Sat, 4 Nov 2023 12:38:29 +0000 Subject: [PATCH 2/2] Update names to match the docstring * lisp/emacs-lisp/cl-extra.el (cl-remprop): Change sym to symbol, tag to propname --- lisp/emacs-lisp/cl-extra.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 15be51bd651..909a1aacc47 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -635,13 +635,13 @@ cl--do-remf (and (cdr p) (progn (setcdr p (cdr (cdr (cdr p)))) t)))) ;;;###autoload -(defun cl-remprop (sym tag) +(defun cl-remprop (symbol propname) "Remove from SYMBOL's plist the property PROPNAME and its value. \n(fn SYMBOL PROPNAME)" - (let ((plist (symbol-plist sym))) - (if (and plist (eq tag (car plist))) - (progn (setplist sym (cdr (cdr plist))) t) - (cl--do-remf plist tag)))) + (let ((plist (symbol-plist symbol))) + (if (and plist (eq propname (car plist))) + (progn (setplist symbol (cdr (cdr plist))) t) + (cl--do-remf plist propname)))) ;;; Streams. -- 2.40.1 --=-=-=--