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: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 66928@debbugs.gnu.org
Subject: bug#66928: [PATCH 2/2] Update names to match the docstring
Date: Sat, 04 Nov 2023 23:34:00 +0000	[thread overview]
Message-ID: <874ji1w0r9.fsf@jeremybryant.net> (raw)
In-Reply-To: <jwvzfzt7bbt.fsf-monnier+emacs@gnu.org>

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

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

This is cosmetic patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-lisp-emacs-lisp-cl-extra.el-cl-remprop-Update-names-.patch --]
[-- Type: text/x-diff, Size: 1232 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 654 bytes --]


Stefan Monnier <monnier@iro.umontreal.ca> 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


  parent reply	other threads:[~2023-11-04 23:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-04 12:49 bug#66928: [PATCH 2/2] Update names to match the docstring Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-04 13:00 ` 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 [this message]
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=874ji1w0r9.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).