From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: john muhl Newsgroups: gmane.emacs.bugs Subject: bug#71736: Small cleanup patches for lua-ts-mode Date: Sun, 23 Jun 2024 09:58:59 -0500 Message-ID: <877cefaeoc.fsf@pub.pink> References: <87ikxzafi5.fsf@pub.pink> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3733"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.1; emacs 30.0.50 To: 71736@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 23 17:00:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sLOhW-0000nc-9v for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Jun 2024 17:00:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLOhL-0006Ub-UA; Sun, 23 Jun 2024 11:00:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLOhI-0006UF-9r for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2024 11:00:05 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLOhH-0007Dc-6S for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2024 11:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sLOhH-0007Ck-Hp for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2024 11:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2024 15:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71736-submit@debbugs.gnu.org id=B71736.171915474827548 (code B ref 71736); Sun, 23 Jun 2024 15:00:03 +0000 Original-Received: (at 71736) by debbugs.gnu.org; 23 Jun 2024 14:59:08 +0000 Original-Received: from localhost ([127.0.0.1]:36056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLOgO-0007AF-2l for submit@debbugs.gnu.org; Sun, 23 Jun 2024 10:59:08 -0400 Original-Received: from fhigh1-smtp.messagingengine.com ([103.168.172.152]:32979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLOgM-00079c-AT for 71736@debbugs.gnu.org; Sun, 23 Jun 2024 10:59:07 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 85AF31140100 for <71736@debbugs.gnu.org>; Sun, 23 Jun 2024 10:59:00 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 23 Jun 2024 10:59:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1719154740; x=1719241140; bh=2ehC+Lnw+T s8RPbATLnrCf696d7jYnp/N4jzJZxuEF8=; b=o6EYq4rfRK+I7WkLWcHgNVtqY3 Nga8sZmLn4Yr41mDRnhIx8aDMOOeEQ/XDaj0/z+mu9qhtuJpTdbji6tgll8p7uMp +olMM1MkYHj1OUi3hM3LGJ4GFkC5NDME3oy1u7J3J2V6lnJWQVSnLYXoR4BpKdAO dErbyQBCFhZNUc3P91wqTt+dMbo33vZaQgj7GC8Bv6G2ai8dcQKkEXVY5WzTJ5Hq 6tpyeGtcZDRACdfxJeONRN4uqAet3Eased7D/ZUrPZlJqa2twt2RDkVtNJqdp6u5 D7L6s64Y3lN00c3Mg8mPdQbOhJgF1oI1MRxhUZcDqvv6ZdDtiKLTCpjMZhxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1719154740; x=1719241140; bh=2ehC+Lnw+Ts8RPbATLnrCf696d7j Ynp/N4jzJZxuEF8=; b=k3i3LHc8B/oGjeE7e50Z7k1cz+u22Ubp0/usjOOjxSwU 5PdVfprj2kpu0Oma4YCkUZQhyncT/yCus9NWvOzNZ5VHLkojBenYDZaIsmaZDGpN iYgXVWgDo4/6JS5RfOuPBBlkFoIb4Y7Of76P7csmP+0oLoXcwt8NTYN39RJQt7Sc E69R9SAj7d9xHyu+4KRjUWLEBoQjbEQtfo/ejHkoVNG5FLJISEWUBckQDter7tZU xmd+MzQS5/xw/X6d0p463nGCr0/91rikjgnOeM64N3zXshKqJl6fbLDDNB3X+u3y 8W9bz/uxLGa7kGrU6Lb2UTKdt2HgT4w+Fn9dgH6baw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeefledgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffgffkfggtgesmhdtre ertdertdenucfhrhhomhepjhhohhhnuchmuhhhlhcuoehjmhesphhusgdrphhinhhkqeen ucggtffrrghtthgvrhhnpefgleehkeehveevtdefjedtuddviefhgfekudelveeuheekge ffleeuvdetheetueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehjmhesphhusgdrphhinhhk X-ME-Proxy: Feedback-ID: i74194916:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for <71736@debbugs.gnu.org>; Sun, 23 Jun 2024 10:58:59 -0400 (EDT) In-Reply-To: <87ikxzafi5.fsf@pub.pink> (john muhl's message of "Sun, 23 Jun 2024 09:41:06 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287794 Archived-At: --=-=-= Content-Type: text/plain john muhl writes: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-eglot-ensure-option-to-lua-ts-mode-hook.patch >From ffb8a2be042c887a77b7fa2ff2640e5f68925c9d Mon Sep 17 00:00:00 2001 From: john muhl Date: Wed, 15 Nov 2023 12:45:18 -0600 Subject: [PATCH 1/4] ; Add 'eglot-ensure' option to 'lua-ts-mode-hook' * lisp/progmodes/lua-ts-mode.el (lua-ts-mode-hook): Add an option to enable Eglot from the lua-ts-mode-hook. (bug#71736) --- lisp/progmodes/lua-ts-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 57dba5e5568..9801f339fdf 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -58,7 +58,8 @@ lua-ts (defcustom lua-ts-mode-hook nil "Hook run after entering `lua-ts-mode'." :type 'hook - :options '(flymake-mode + :options '(eglot-ensure + flymake-mode hs-minor-mode outline-minor-mode) :version "30.1") -- 2.45.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Use-keymap-set-in-lua-ts-mode-bug-71736.patch >From 1d627c785ca84498b7616a498b6d9f899915cf7b Mon Sep 17 00:00:00 2001 From: john muhl Date: Wed, 22 May 2024 12:23:19 -0500 Subject: [PATCH 2/4] ; Use 'keymap-set' in 'lua-ts-mode' (bug#71736) * lisp/progmodes/lua-ts-mode.el (lua-ts-mode-map): Replace 'define-key' with 'keymap-set'. --- lisp/progmodes/lua-ts-mode.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 9801f339fdf..1d995e20df4 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -740,11 +740,11 @@ lua-ts-inferior--write-history (defvar lua-ts-mode-map (let ((map (make-sparse-keymap "Lua"))) - (define-key map "\C-c\C-n" 'lua-ts-inferior-lua) - (define-key map "\C-c\C-c" 'lua-ts-send-buffer) - (define-key map "\C-c\C-l" 'lua-ts-send-file) - (define-key map "\C-c\C-r" 'lua-ts-send-region) - (define-key map "\C-c\C-t" 'lua-ts-send-thing) + (keymap-set map "C-c C-n" 'lua-ts-inferior-lua) + (keymap-set map "C-c C-c" 'lua-ts-send-buffer) + (keymap-set map "C-c C-l" 'lua-ts-send-file) + (keymap-set map "C-c C-r" 'lua-ts-send-region) + (keymap-set map "C-c C-t" 'lua-ts-send-thing) map) "Keymap for `lua-ts-mode' buffers.") -- 2.45.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-lua-ts-mode.el-Reword-doc.-bug-71736.patch >From ebb8f0f29a13034e6626dfd23f50945cd5dcbd0e Mon Sep 17 00:00:00 2001 From: john muhl Date: Wed, 12 Jun 2024 10:41:03 -0500 Subject: [PATCH 3/4] ; * lua-ts-mode.el: Reword doc. (bug#71736) --- lisp/progmodes/lua-ts-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 1d995e20df4..79fbde1f2d4 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -117,7 +117,7 @@ lua-ts-inferior-history (defcustom lua-ts-indent-continuation-lines t "Controls how multi-line if/else statements are aligned. -If t, then continuation lines are indented by `lua-ts-indent-offset': +If non-nil, then continuation lines are indented by `lua-ts-indent-offset': if a and b then -- 2.45.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-Remove-useless-require-of-rx-in-lua-ts-mode.patch >From abecae7d631f4b313fe8510f47e480f1a82bb4ad Mon Sep 17 00:00:00 2001 From: john muhl Date: Thu, 13 Jun 2024 15:19:04 -0500 Subject: [PATCH 4/4] ; Remove useless require of 'rx' in 'lua-ts-mode' * lisp/progmodes/lua-ts-mode.el: No need to require 'rx' since it is preloaded. (bug#71736) --- lisp/progmodes/lua-ts-mode.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 79fbde1f2d4..5a73a9fc01c 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -34,9 +34,6 @@ (require 'comint) (require 'treesit) -(eval-when-compile - (require 'rx)) - (declare-function treesit-induce-sparse-tree "treesit.c") (declare-function treesit-node-child-by-field-name "treesit.c") (declare-function treesit-node-child-count "treesit.c") -- 2.45.2 --=-=-= Content-Type: text/plain > Tags: patch > > Following up with a few trivial cleanups in lua-ts-mode. --=-=-=--