emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 88378ac: Rename arguments of ERC's '/whois' and simplify doc st


From: Amin Bandali
Subject: emacs-28 88378ac: Rename arguments of ERC's '/whois' and simplify doc string
Date: Fri, 1 Oct 2021 01:23:46 -0400 (EDT)

branch: emacs-28
commit 88378acbfc79fafef2d877c9a32c5d1bef931ffc
Author: Stefan Kangas <stefan@marxist.se>
Commit: Amin Bandali <bandali@gnu.org>

    Rename arguments of ERC's '/whois' and simplify doc string
    
    * lisp/erc/erc.el (erc-cmd-WHOIS): Rename arguments and reword the doc
    string to further clarify and simplify.
---
 lisp/erc/erc.el | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 2427332..a57c332 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -3298,24 +3298,22 @@ a script after exceeding the flood threshold."
     t)
    (t nil)))
 
-(defun erc-cmd-WHOIS (nick-or-server &optional nick-if-server)
+(defun erc-cmd-WHOIS (first &optional second)
   "Display whois information for the given user.
 
-If NICK-IF-SERVER is nil, NICK-OR-SERVER should be the nick of
-the user about whom the whois information is to be requested.
-Otherwise, if NICK-IF-SERVER is non-nil, NICK-OR-SERVER should be
-the server to which the user with the nick NICK-IF-USER is
-connected to.
-
-Specifying the server NICK-OR-SERVER that the nick NICK-IF-SERVER
-is connected to is useful for getting the time the NICK-IF-SERVER
-user has been idle for, when the user NICK-IF-SERVER is connected
-to a different server of the network than the one current user is
-connected to, since only the server a user is connected to knows
-the idle time of that user."
+With one argument, FIRST is the nickname of the user to request
+whois information for.
+
+With two arguments, FIRST is the server, and SECOND is the user
+nickname.
+
+Specifying the server is useful for getting the time the user has
+been idle for, when the user is connected to a different server
+on the same IRC network.  (Only the server a user is connected to
+knows how long the user has been idle for.)"
   (let ((send (if nick-if-server
-                  (format "WHOIS %s %s" nick-or-server nick-if-server)
-                (format "WHOIS %s" nick-or-server))))
+                  (format "WHOIS %s %s" first second)
+                (format "WHOIS %s" first))))
     (erc-log (format "cmd: %s" send))
     (erc-server-send send)
     t))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]