Subject: bug#66928: [PATCH 2/2] Update names to match the docstring

From: Jeremy Bryant <[email-masked]>
Date: Sat, 04 Nov 2023 23:34:00 +0000

Attached is a proposed patch to install, with the two changes requested.

This is cosmetic patch.

>From 4036426119ca939070f5353671eff9f22ed66598 Mon Sep 17 00:00:00 2001
From: Jeremy Bryant <[email-masked]>
Date: Sat, 4 Nov 2023 23:29:10 +0000
Subject: [PATCH 2/2] * lisp/emacs-lisp/cl-extra.el (cl-remprop): Update names
 to match docstring

---
 lisp/emacs-lisp/cl-extra.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index de5eb9c2d92..e41bf1cdb0b 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -633,13 +633,12 @@ cl--do-remf
     (and (cdr p) (progn (setcdr p (cdr (cdr (cdr p)))) t))))
 
 ;;;###autoload
-(defun cl-remprop (sym tag)
-  "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))))
+(defun cl-remprop (symbol propname)
+  "Remove from SYMBOL's plist the property PROPNAME and its value."
+  (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

Stefan Monnier <[email-masked]> writes:

>> I noticed that for the function below the docstring doesn't match the
>> arg names.
>
> I agree it's an odd choice (requiring the use of `\n(fn SYMBOL PROPNAME)`),
> but it's not a big problem since the (fn SYMBOL PROPNAME) makes sure
> that the right names are presented in `C-h o`.
>
> If you want to install a patch like you suggest, then please remove the
> (fn SYMBOL PROPNAME) since it makes it redundant.
> It'd be considered as a cosmetic patch.
>
> One more thing: the first line of the commit should be a bit more
> specific, e.g. it could start with "(cl-remprop):"
>
>
>         Stefan