unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jeremy Bryant via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 66928@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#66928: [PATCH 2/2] Update names to match the docstring
Date: Sat, 04 Nov 2023 12:49:27 +0000	[thread overview]
Message-ID: <87cywpwuid.fsf@jeremybryant.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

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 



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-Update-names-to-match-the-docstring.patch --]
[-- Type: text/patch, Size: 1201 bytes --]

From 927b8ef441c1367ba1fcf08172f3eb6b739eddab Mon Sep 17 00:00:00 2001
From: Jeremy Bryant <jb@jeremybryant.net>
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


             reply	other threads:[~2023-11-04 12:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-04 12:49 Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-11-04 13:00 ` bug#66928: [PATCH 2/2] Update names to match the docstring Eli Zaretskii
2023-11-04 16:13 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-04 22:56   ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-05 14:09     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-06 22:55       ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-12 21:02         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-13 13:58           ` Eli Zaretskii
2023-11-04 23:34   ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-12 20:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cywpwuid.fsf@jeremybryant.net \
    --to=bug-gnu-emacs@gnu.org \
    --cc=66928@debbugs.gnu.org \
    --cc=jb@jeremybryant.net \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).