From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CC1uB11BqF+/OAAA0tVLHw (envelope-from ) for ; Sun, 08 Nov 2020 19:05:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id +AkyA11BqF++XAAAB5/wlQ (envelope-from ) for ; Sun, 08 Nov 2020 19:05:01 +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) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AF7C19402C8 for ; Sun, 8 Nov 2020 19:05:00 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E9ADC28C6D; Sun, 8 Nov 2020 14:03:59 -0500 (EST) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id 8B31327102 for ; Sun, 8 Nov 2020 14:03:15 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 6222C16660 for ; Sun, 8 Nov 2020 20:03:13 +0100 (CET) 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 10124) with ESMTP id p2QQPEAcwaen for ; Sun, 8 Nov 2020 20:03:13 +0100 (CET) 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 CEFBD1666F for ; Sun, 8 Nov 2020 20:03:12 +0100 (CET) From: Jonas Bernoulli To: notmuch@notmuchmail.org Subject: [PATCH 23/27] emacs: use setq-local Date: Sun, 8 Nov 2020 20:03:07 +0100 Message-Id: <20201108190311.1397-24-jonas@bernoul.li> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201108190311.1397-1-jonas@bernoul.li> References: <20201108190311.1397-1-jonas@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: ZMVRM4YW6M5WEAI3R6PAUIWWBRPYRCUT X-Message-ID-Hash: ZMVRM4YW6M5WEAI3R6PAUIWWBRPYRCUT 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-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; 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-Spam-Score: -0.01 X-TUID: zcEXcH4Ww3u2 It is available since Emacs 24.3 and we require at least Emacs 25. It makes the variable buffer-local if it isn't always buffer-local anyway. --- emacs/notmuch-company.el | 3 +-- emacs/notmuch-parser.el | 5 ++--- emacs/notmuch.el | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el index 9e743029..b50e73c8 100644 --- a/emacs/notmuch-company.el +++ b/emacs/notmuch-company.el @@ -55,8 +55,7 @@ (defvar notmuch-address-command) ;;;###autoload (defun notmuch-company-setup () (company-mode) - (make-local-variable 'company-backends) - (setq company-backends '(notmuch-company)) + (setq-local company-backends '(notmuch-company)) ;; Disable automatic company completion unless an internal ;; completion method is configured. Company completion (using ;; internal completion) can still be accessed via standard company diff --git a/emacs/notmuch-parser.el b/emacs/notmuch-parser.el index 3aa5bd8f..4a437016 100644 --- a/emacs/notmuch-parser.el +++ b/emacs/notmuch-parser.el @@ -168,9 +168,8 @@ (defun notmuch-sexp-parse-partial-list (result-function result-buffer) move point in the input buffer." ;; Set up the initial state (unless (local-variable-p 'notmuch-sexp--parser) - (set (make-local-variable 'notmuch-sexp--parser) - (notmuch-sexp-create-parser)) - (set (make-local-variable 'notmuch-sexp--state) 'begin)) + (setq-local notmuch-sexp--parser (notmuch-sexp-create-parser)) + (setq-local notmuch-sexp--state 'begin)) (let (done) (while (not done) (cl-case notmuch-sexp--state diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 3ca27b26..95770fc3 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -391,7 +391,7 @@ (define-derived-mode notmuch-search-mode fundamental-mode "notmuch-search" (make-local-variable 'notmuch-search-target-thread) (make-local-variable 'notmuch-search-target-line) (setq notmuch-buffer-refresh-function #'notmuch-search-refresh-view) - (set (make-local-variable 'scroll-preserve-screen-position) t) + (setq-local scroll-preserve-screen-position t) (add-to-invisibility-spec (cons 'ellipsis t)) (setq truncate-lines t) (setq buffer-read-only t) -- 2.29.1