From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OHAPNI9i9WALGwAAgWs5BA (envelope-from ) for ; Mon, 19 Jul 2021 13:31:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8FTvL49i9WCeCQAA1q6Kng (envelope-from ) for ; Mon, 19 Jul 2021 11:31:27 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 423A612B71 for ; Mon, 19 Jul 2021 13:31:27 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id F29E3290D9; Mon, 19 Jul 2021 07:31:18 -0400 (EDT) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id 45AFF290D3 for ; Mon, 19 Jul 2021 07:31:13 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 48843165D6 for ; Mon, 19 Jul 2021 13:31:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=sel2011a; t=1626694270; bh=TLmNrM1GKTE7Tbp 4ORCdHl9o1UHhl5jiNE9nnA6wRE8=; b=wEELsAoHqdSk/yB3uRs/zDqXbx2MsUb xA52sofJ6X8Gw/oq3lvhEX5/SaeRdzW+S8VSuh1LCk4TIvDU7q7vWJdrG2j62+O7 Vhdhk6OtanVIK0kQq473Idl4Nsnr32dEYAa+UD16GmGaDeKwDMOM8iL7gWPpIg5p 8dOBBrTQLLec= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id Ujy5o5S3uCbx for ; Mon, 19 Jul 2021 13:31:10 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 0E6B9165C4 for ; Mon, 19 Jul 2021 13:31:10 +0200 (CEST) From: Jonas Bernoulli To: notmuch@notmuchmail.org Subject: [PATCH 1/5] emacs: use closures instead of backquoted lambdas Date: Mon, 19 Jul 2021 13:31:05 +0200 Message-Id: <20210719113109.5197-2-jonas@bernoul.li> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210719113109.5197-1-jonas@bernoul.li> References: <20210719113109.5197-1-jonas@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: D7EJK7JJU2352NJ2Y6OU7I6TX6SEDFM7 X-Message-ID-Hash: D7EJK7JJU2352NJ2Y6OU7I6TX6SEDFM7 X-MailFrom: jonas@bernoul.li X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626694287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ruaDS6DdUHAVoTThibs5oVAJYgX6APx+C4Xr4mnXQis=; b=l/4yHvR8AvrIcj26r2EkWcd6ELhhSq8zPCARa2g8jd30tGPDRy4zD6/+Wel36awlop9ZYs lqOfjVgKIbpfU5FrQMv85qT+x4e6MJOy3uyyRvypq9Mkv+ZBQ91EQoeOkCjB3YlYdVuTmP zyNdT7TsOg+PNE3kJ3XfvEqHgedgukARKkK4YNiplZnKC1SbYhFuA4VqK1ZHhHDSdtzYvv NUJEZvYpMZIteUK1L6kJxpzrjsugXGAAmSVtMggjLFQ+kQYgm0FsMOA2UM2o///8HE0l3U LjrdwUCRmSsj4Zf86RCOOLHUzOcBX1aPXObhGbyHdts4DdVNQaKN3dauAQdKlw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626694287; a=rsa-sha256; cv=none; b=k4yY6LkYhcPGd4cnE2PazGVX/rG8qnVbWi8Ntsb89pTO7GfzP+54rHgKJUgxxq13b0d36a vgUyPu4rm+nRrxpJC52rAjAu2+KK1i97p25jZ086oPIVUCYN3f0FLSTZejowTpVfPBj1M6 HpJF35YzDa4Yh3e1X6GSQQ062v1C+Y7VXr/jVT1ZwBEwTla6ibxkyBiUTGfFxBRueFHa3m OB9rIlbib3H0E2HiCW2UlgyatCSJ68csEGCkVTarnjZevF9D/RC6MR173vvpOYYCvKBgEu WzGXHVQx9bcgNEPbZoQjPC6mn1p0je3/LuspmoDD8C11pTb4EZ77L8q+GUV+MA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=bernoul.li header.s=sel2011a header.b=wEELsAoH; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=bernoul.li header.s=sel2011a header.b=wEELsAoH; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 423A612B71 X-Spam-Score: -0.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: m8ppKLTJIs4e --- emacs/notmuch-hello.el | 16 ++++++++-------- emacs/notmuch-jump.el | 26 ++++++++++++++------------ emacs/notmuch-tag.el | 2 +- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 1e66555b..c1b67e22 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -869,16 +869,16 @@ (defun notmuch-hello-insert-searches (title query-list &rest options) (start (point))) (if is-hidden (widget-create 'push-button - :notify `(lambda (widget &rest _ignore) - (setq notmuch-hello-hidden-sections - (delete ,title notmuch-hello-hidden-sections)) - (notmuch-hello-update)) + :notify (lambda (&rest _ignore) + (setq notmuch-hello-hidden-sections + (delete title notmuch-hello-hidden-sections)) + (notmuch-hello-update)) "show") (widget-create 'push-button - :notify `(lambda (widget &rest _ignore) - (add-to-list 'notmuch-hello-hidden-sections - ,title) - (notmuch-hello-update)) + :notify (lambda (&rest _ignore) + (add-to-list 'notmuch-hello-hidden-sections + title) + (notmuch-hello-update)) "hide")) (widget-insert "\n") (unless is-hidden diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el index e228c8a2..c0760638 100644 --- a/emacs/notmuch-jump.el +++ b/emacs/notmuch-jump.el @@ -50,11 +50,11 @@ (defun notmuch-jump-search () (push (list key name (cond ((eq (plist-get saved-search :search-type) 'tree) - `(lambda () (notmuch-tree ',query))) + (lambda () (notmuch-tree query))) ((eq (plist-get saved-search :search-type) 'unthreaded) - `(lambda () (notmuch-unthreaded ',query))) + (lambda () (notmuch-unthreaded query))) (t - `(lambda () (notmuch-search ',query ',oldest-first))))) + (lambda () (notmuch-search query oldest-first))))) action-map))))) (setq action-map (nreverse action-map)) (if action-map @@ -168,9 +168,10 @@ (defun notmuch-jump--make-keymap (action-map prompt) (pcase-dolist (`(,key ,_name ,fn) action-map) (when (= (length key) 1) (define-key map key - `(lambda () (interactive) - (setq notmuch-jump--action ',fn) - (exit-minibuffer))))) + (lambda () + (interactive) + (setq notmuch-jump--action fn) + (exit-minibuffer))))) ;; By doing this in two passes (and checking if we already have a ;; binding) we avoid problems if the user specifies a binding which ;; is a prefix of another binding. @@ -191,12 +192,13 @@ (defun notmuch-jump--make-keymap (action-map prompt) action-submap) (setq action-submap (nreverse action-submap)) (define-key map keystr - `(lambda () (interactive) - (setq notmuch-jump--action - ',(apply-partially #'notmuch-jump - action-submap - new-prompt)) - (exit-minibuffer))))))) + (lambda () + (interactive) + (setq notmuch-jump--action + (apply-partially #'notmuch-jump + action-submap + new-prompt)) + (exit-minibuffer))))))) map)) (provide 'notmuch-jump) diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index ebccb5a0..e3a60441 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -553,7 +553,7 @@ (defun notmuch-tag-jump (reverse) name) (mapconcat #'identity tag-change " ")))) (push (list key name-string - `(lambda () (,tag-function ',tag-change))) + (lambda () (funcall tag-function tag-change))) action-map))) (push (list notmuch-tag-jump-reverse-key (if reverse -- 2.31.1