From afbd8140e41abcc32c628cf493cc2783fe348115 Mon Sep 17 00:00:00 2001 From: Vibhav Pant Date: Sun, 19 Nov 2017 14:52:06 +0530 Subject: [PATCH] lisp/erc/erc-services.el: Fix arg eval order of inline functions. * lisp/erc/erc-services.el (erc-nickserv-alist-sender, erc-nickserv-alist-regexp, erc-nickserv-alist-nickserv, erc-nickserv-alist-ident-keyword, erc-nickserv-alist-use-nick-p, erc-nickserv-alist-ident-command, erc-nickserv-alist-identified-regexp): Use `inline-letevals' to make sure that `network' is evaluated first and independently of `entry'. --- lisp/erc/erc-services.el | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index c2e653d9166..348a592a888 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -313,25 +313,32 @@ The last two elements are optional." (define-inline erc-nickserv-alist-sender (network &optional entry) - (inline-quote (nth 1 (or ,entry (assoc ,network erc-nickserv-alist))))) + (inline-letevals (network entry) + (inline-quote (nth 1 (or ,entry (assoc ,network erc-nickserv-alist)))))) (define-inline erc-nickserv-alist-regexp (network &optional entry) - (inline-quote (nth 2 (or ,entry (assoc ,network erc-nickserv-alist))))) + (inline-letevals (network entry) + (inline-quote (nth 2 (or ,entry (assoc ,network erc-nickserv-alist)))))) (define-inline erc-nickserv-alist-nickserv (network &optional entry) - (inline-quote (nth 3 (or ,entry (assoc ,network erc-nickserv-alist))))) + (inline-letevals (network entry) + (inline-quote (nth 3 (or ,entry (assoc ,network erc-nickserv-alist)))))) (define-inline erc-nickserv-alist-ident-keyword (network &optional entry) - (inline-quote (nth 4 (or ,entry (assoc ,network erc-nickserv-alist))))) + (inline-letevals (network entry) + (inline-quote (nth 4 (or ,entry (assoc ,network erc-nickserv-alist)))))) (define-inline erc-nickserv-alist-use-nick-p (network &optional entry) - (inline-quote (nth 5 (or ,entry (assoc ,network erc-nickserv-alist))))) + (inline-letevals (network entry) + (inline-quote (nth 5 (or ,entry (assoc ,network erc-nickserv-alist)))))) (define-inline erc-nickserv-alist-ident-command (network &optional entry) - (inline-quote (nth 6 (or ,entry (assoc ,network erc-nickserv-alist))))) + (inline-letevals (network entry) + (inline-quote (nth 6 (or ,entry (assoc ,network erc-nickserv-alist)))))) (define-inline erc-nickserv-alist-identified-regexp (network &optional entry) - (inline-quote (nth 7 (or ,entry (assoc ,network erc-nickserv-alist))))) + (inline-letevals (network entry) + (inline-quote (nth 7 (or ,entry (assoc ,network erc-nickserv-alist)))))) ;; Functions: -- 2.39.2