From: john muhl <jm@pub.pink>
To: 71736@debbugs.gnu.org
Subject: bug#71736: Small cleanup patches for lua-ts-mode
Date: Sun, 23 Jun 2024 09:58:59 -0500 [thread overview]
Message-ID: <877cefaeoc.fsf@pub.pink> (raw)
In-Reply-To: <87ikxzafi5.fsf@pub.pink> (john muhl's message of "Sun, 23 Jun 2024 09:41:06 -0500")
[-- Attachment #1: Type: text/plain, Size: 33 bytes --]
john muhl <jm@pub.pink> writes:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-eglot-ensure-option-to-lua-ts-mode-hook.patch --]
[-- Type: text/x-patch, Size: 902 bytes --]
From ffb8a2be042c887a77b7fa2ff2640e5f68925c9d Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-Use-keymap-set-in-lua-ts-mode-bug-71736.patch --]
[-- Type: text/x-patch, Size: 1294 bytes --]
From 1d627c785ca84498b7616a498b6d9f899915cf7b Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-lua-ts-mode.el-Reword-doc.-bug-71736.patch --]
[-- Type: text/x-patch, Size: 822 bytes --]
From ebb8f0f29a13034e6626dfd23f50945cd5dcbd0e Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-Remove-useless-require-of-rx-in-lua-ts-mode.patch --]
[-- Type: text/x-patch, Size: 857 bytes --]
From abecae7d631f4b313fe8510f47e480f1a82bb4ad Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
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
[-- Attachment #6: Type: text/plain, Size: 77 bytes --]
> Tags: patch
>
> Following up with a few trivial cleanups in lua-ts-mode.
next prev parent reply other threads:[~2024-06-23 14:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-23 14:41 bug#71736: Small cleanup patches for lua-ts-mode john muhl
2024-06-23 14:58 ` john muhl [this message]
2024-06-23 15:51 ` Stefan Kangas
2024-06-23 16:12 ` john muhl
2024-06-27 9:02 ` Eli Zaretskii
2024-06-27 23:05 ` Stefan Kangas
2024-06-28 16:24 ` john muhl
2024-06-28 19:56 ` Stefan Kangas
2024-06-28 22:16 ` john muhl
2024-06-29 2:59 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cefaeoc.fsf@pub.pink \
--to=jm@pub.pink \
--cc=71736@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).