diff options
| author | Vibhav Pant | 2017-12-02 11:08:34 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2017-12-02 11:08:34 +0530 |
| commit | 4856ee17175a80dc105e060c1184d3b3df07e1cf (patch) | |
| tree | 32116db93716853a590e8c90f1fb2a2a94b5ad05 /lisp | |
| parent | 0b6f4f2c6086a04b27d87d4f06b71334da3933d5 (diff) | |
| download | emacs-4856ee17175a80dc105e060c1184d3b3df07e1cf.tar.gz emacs-4856ee17175a80dc105e060c1184d3b3df07e1cf.zip | |
lisp/erc/erc.el: Use inline-letevals for when args are buffer local.
* 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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/erc/erc.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 9b4c6ac48a3..eee79464a9a 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -409,16 +409,18 @@ in the current buffer's `erc-channel-users' hash table." | |||
| 409 | (define-inline erc-get-server-user (nick) | 409 | (define-inline erc-get-server-user (nick) |
| 410 | "Find the USER corresponding to NICK in the current server's | 410 | "Find the USER corresponding to NICK in the current server's |
| 411 | `erc-server-users' hash table." | 411 | `erc-server-users' hash table." |
| 412 | (inline-quote (erc-with-server-buffer | 412 | (inline-letevals (nick) |
| 413 | (gethash (erc-downcase ,nick) erc-server-users)))) | 413 | (inline-quote (erc-with-server-buffer |
| 414 | (gethash (erc-downcase ,nick) erc-server-users))))) | ||
| 414 | 415 | ||
| 415 | (define-inline erc-add-server-user (nick user) | 416 | (define-inline erc-add-server-user (nick user) |
| 416 | "This function is for internal use only. | 417 | "This function is for internal use only. |
| 417 | 418 | ||
| 418 | Adds USER with nickname NICK to the `erc-server-users' hash table." | 419 | Adds USER with nickname NICK to the `erc-server-users' hash table." |
| 419 | (inline-quote | 420 | (inline-letevals (nick user) |
| 420 | (erc-with-server-buffer | 421 | (inline-quote |
| 421 | (puthash (erc-downcase ,nick) ,user erc-server-users)))) | 422 | (erc-with-server-buffer |
| 423 | (puthash (erc-downcase ,nick) ,user erc-server-users))))) | ||
| 422 | 424 | ||
| 423 | (define-inline erc-remove-server-user (nick) | 425 | (define-inline erc-remove-server-user (nick) |
| 424 | "This function is for internal use only. | 426 | "This function is for internal use only. |
| @@ -428,9 +430,10 @@ hash table. This user is not removed from the | |||
| 428 | `erc-channel-users' lists of other buffers. | 430 | `erc-channel-users' lists of other buffers. |
| 429 | 431 | ||
| 430 | See also: `erc-remove-user'." | 432 | See also: `erc-remove-user'." |
| 431 | (inline-quote | 433 | (inline-letevals (nick) |
| 432 | (erc-with-server-buffer | 434 | (inline-quote |
| 433 | (remhash (erc-downcase ,nick) erc-server-users)))) | 435 | (erc-with-server-buffer |
| 436 | (remhash (erc-downcase ,nick) erc-server-users))))) | ||
| 434 | 437 | ||
| 435 | (defun erc-change-user-nickname (user new-nick) | 438 | (defun erc-change-user-nickname (user new-nick) |
| 436 | "This function is for internal use only. | 439 | "This function is for internal use only. |