]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/erc/erc.el: Use inline-letevals for when args are buffer local.
authorVibhav Pant <vibhavp@gmail.com>
Sat, 2 Dec 2017 05:38:34 +0000 (11:08 +0530)
committerVibhav Pant <vibhavp@gmail.com>
Sat, 2 Dec 2017 05:38:34 +0000 (11:08 +0530)
* lisp/erc/erc.el: (erc-get-server-user, erc-add-server-user,
  erc-remove-server-user): Use inline-letevals for when the arguments
  refer to buffer-local variables.

lisp/erc/erc.el

index 9b4c6ac48a31cc2cd89fa72a4d0837dc9a5512a2..eee79464a9a86a766e7708ff26fde67d76fa4e86 100644 (file)
@@ -409,16 +409,18 @@ in the current buffer's `erc-channel-users' hash table."
 (define-inline erc-get-server-user (nick)
   "Find the USER corresponding to NICK in the current server's
 `erc-server-users' hash table."
-  (inline-quote (erc-with-server-buffer
-                 (gethash (erc-downcase ,nick) erc-server-users))))
+  (inline-letevals (nick)
+    (inline-quote (erc-with-server-buffer
+                   (gethash (erc-downcase ,nick) erc-server-users)))))
 
 (define-inline erc-add-server-user (nick user)
   "This function is for internal use only.
 
 Adds USER with nickname NICK to the `erc-server-users' hash table."
-  (inline-quote
-   (erc-with-server-buffer
-     (puthash (erc-downcase ,nick) ,user erc-server-users))))
+  (inline-letevals (nick user)
+    (inline-quote
+     (erc-with-server-buffer
+       (puthash (erc-downcase ,nick) ,user erc-server-users)))))
 
 (define-inline erc-remove-server-user (nick)
   "This function is for internal use only.
@@ -428,9 +430,10 @@ hash table.  This user is not removed from the
 `erc-channel-users' lists of other buffers.
 
 See also: `erc-remove-user'."
-  (inline-quote
-   (erc-with-server-buffer
-     (remhash (erc-downcase ,nick) erc-server-users))))
+  (inline-letevals (nick)
+    (inline-quote
+     (erc-with-server-buffer
+       (remhash (erc-downcase ,nick) erc-server-users)))))
 
 (defun erc-change-user-nickname (user new-nick)
   "This function is for internal use only.