* bug#71736: Small cleanup patches for lua-ts-mode @ 2024-06-23 14:41 john muhl 2024-06-23 14:58 ` john muhl 0 siblings, 1 reply; 10+ messages in thread From: john muhl @ 2024-06-23 14:41 UTC (permalink / raw) To: 71736 Tags: patch Following up with a few trivial cleanups in lua-ts-mode. ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#71736: Small cleanup patches for lua-ts-mode 2024-06-23 14:41 bug#71736: Small cleanup patches for lua-ts-mode john muhl @ 2024-06-23 14:58 ` john muhl 2024-06-23 15:51 ` Stefan Kangas 0 siblings, 1 reply; 10+ messages in thread From: john muhl @ 2024-06-23 14:58 UTC (permalink / raw) To: 71736 [-- 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. ^ permalink raw reply related [flat|nested] 10+ messages in thread
* bug#71736: Small cleanup patches for lua-ts-mode 2024-06-23 14:58 ` john muhl @ 2024-06-23 15:51 ` Stefan Kangas 2024-06-23 16:12 ` john muhl 0 siblings, 1 reply; 10+ messages in thread From: Stefan Kangas @ 2024-06-23 15:51 UTC (permalink / raw) To: john muhl, 71736 john muhl <jm@pub.pink> writes: > 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) I don't think "rx" is preloaded. In emacs -Q, (featurep 'rx) is nil. ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#71736: Small cleanup patches for lua-ts-mode 2024-06-23 15:51 ` Stefan Kangas @ 2024-06-23 16:12 ` john muhl 2024-06-27 9:02 ` Eli Zaretskii 0 siblings, 1 reply; 10+ messages in thread From: john muhl @ 2024-06-23 16:12 UTC (permalink / raw) To: Stefan Kangas; +Cc: 71736 Stefan Kangas <stefankangas@gmail.com> writes: > john muhl <jm@pub.pink> writes: > >> 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) > > I don't think "rx" is preloaded. In emacs -Q, (featurep 'rx) is nil. I guess I got confused. I tried: $ src/emacs -Q -batch -eval '(message "%s" (rx bos "heyo" eos))' \`heyo\` which led me to think it didn’t need to be required. Feel free to discard. ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#71736: Small cleanup patches for lua-ts-mode 2024-06-23 16:12 ` john muhl @ 2024-06-27 9:02 ` Eli Zaretskii 2024-06-27 23:05 ` Stefan Kangas 0 siblings, 1 reply; 10+ messages in thread From: Eli Zaretskii @ 2024-06-27 9:02 UTC (permalink / raw) To: john muhl; +Cc: stefankangas, 71736 > Cc: 71736@debbugs.gnu.org > From: john muhl <jm@pub.pink> > Date: Sun, 23 Jun 2024 11:12:21 -0500 > > Stefan Kangas <stefankangas@gmail.com> writes: > > > john muhl <jm@pub.pink> writes: > > > >> 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) > > > > I don't think "rx" is preloaded. In emacs -Q, (featurep 'rx) is nil. > > I guess I got confused. I tried: > > $ src/emacs -Q -batch -eval '(message "%s" (rx bos "heyo" eos))' > \`heyo\` > > which led me to think it didn’t need to be required. Feel free to > discard. Discard all of the patches or just that 4/4 part? ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#71736: Small cleanup patches for lua-ts-mode 2024-06-27 9:02 ` Eli Zaretskii @ 2024-06-27 23:05 ` Stefan Kangas 2024-06-28 16:24 ` john muhl 0 siblings, 1 reply; 10+ messages in thread From: Stefan Kangas @ 2024-06-27 23:05 UTC (permalink / raw) To: Eli Zaretskii, john muhl; +Cc: 71736 Eli Zaretskii <eliz@gnu.org> writes: > Discard all of the patches or just that 4/4 part? I think just the 4/4 part, indeed, so I've installed patches 1 and 3 on emacs-30. I think patch 2 should go to master, but it doesn't apply cleanly. John, could you please rebase it and resend? ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#71736: Small cleanup patches for lua-ts-mode 2024-06-27 23:05 ` Stefan Kangas @ 2024-06-28 16:24 ` john muhl 2024-06-28 19:56 ` Stefan Kangas 0 siblings, 1 reply; 10+ messages in thread From: john muhl @ 2024-06-28 16:24 UTC (permalink / raw) To: Stefan Kangas; +Cc: Eli Zaretskii, 71736 [-- Attachment #1: Type: text/plain, Size: 674 bytes --] Stefan Kangas <stefankangas@gmail.com> writes: > Eli Zaretskii <eliz@gnu.org> writes: > >> Discard all of the patches or just that 4/4 part? > > I think just the 4/4 part, indeed, so I've installed patches 1 and 3 on > emacs-30. Yep. I meant just the one part but of course you can always discard whatever you like :) > I think patch 2 should go to master, but it doesn't apply cleanly. > John, could you please rebase it and resend? Oops, I see now it included a bit of unrelated local changes. Here’s another try. I rebased it and checked that it applies to emacs-30 and master. Out of curiousity, what makes it unfit for the emacs-30 branch? [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Use-keymap-set-in-lua-ts-mode-bug-71736.patch --] [-- Type: text/x-patch, Size: 1184 bytes --] From 8a1ba22c7c52f5b35e4ffcc292cef3bd35722a66 Mon Sep 17 00:00:00 2001 From: john muhl <jm@pub.pink> Date: Wed, 22 May 2024 12:23:19 -0500 Subject: [PATCH] ; 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 8d0f49c2d89..06daadbc1fd 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -722,10 +722,10 @@ 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) + (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) map) "Keymap for `lua-ts-mode' buffers.") -- 2.45.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* bug#71736: Small cleanup patches for lua-ts-mode 2024-06-28 16:24 ` john muhl @ 2024-06-28 19:56 ` Stefan Kangas 2024-06-28 22:16 ` john muhl 0 siblings, 1 reply; 10+ messages in thread From: Stefan Kangas @ 2024-06-28 19:56 UTC (permalink / raw) To: john muhl; +Cc: 71736-done, Eli Zaretskii Version: 30.1 john muhl <jm@pub.pink> writes: > Stefan Kangas <stefankangas@gmail.com> writes: > >> I think patch 2 should go to master, but it doesn't apply cleanly. >> John, could you please rebase it and resend? > > Oops, I see now it included a bit of unrelated local changes. > > Here’s another try. I rebased it and checked that it applies to > emacs-30 and master. Thanks! > Out of curiousity, what makes it unfit for the emacs-30 branch? We prefer not to put code cleanups on the release branch. So I've now pushed it to `master`, and I'm closing this bug report. BTW, is there any reason not to use `defvar-keymap' in lua-ts-mode.el? Does it need to be compatible with Emacs 28? ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#71736: Small cleanup patches for lua-ts-mode 2024-06-28 19:56 ` Stefan Kangas @ 2024-06-28 22:16 ` john muhl 2024-06-29 2:59 ` Stefan Kangas 0 siblings, 1 reply; 10+ messages in thread From: john muhl @ 2024-06-28 22:16 UTC (permalink / raw) To: 71736; +Cc: stefankangas Stefan Kangas <stefankangas@gmail.com> writes: > BTW, is there any reason not to use `defvar-keymap' in > lua-ts-mode.el? Probably I did not remember (or know) it was available. I’ll change it. > Does it need to be compatible with Emacs 28? Let’s hope not. ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#71736: Small cleanup patches for lua-ts-mode 2024-06-28 22:16 ` john muhl @ 2024-06-29 2:59 ` Stefan Kangas 0 siblings, 0 replies; 10+ messages in thread From: Stefan Kangas @ 2024-06-29 2:59 UTC (permalink / raw) To: john muhl, 71736 john muhl <jm@pub.pink> writes: > Stefan Kangas <stefankangas@gmail.com> writes: > >> BTW, is there any reason not to use `defvar-keymap' in >> lua-ts-mode.el? > > Probably I did not remember (or know) it was available. I’ll > change it. Thanks. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-06-29 2:59 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-06-23 14:41 bug#71736: Small cleanup patches for lua-ts-mode john muhl 2024-06-23 14:58 ` john muhl 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
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).