Subject: bug#71736: Small cleanup patches for lua-ts-mode

From: john muhl <[email-masked]>
Date: Fri, 28 Jun 2024 11:24:41 -0500

Stefan Kangas <[email-masked]> writes:

> Eli Zaretskii <[email-masked]> 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?

>From 8a1ba22c7c52f5b35e4ffcc292cef3bd35722a66 Mon Sep 17 00:00:00 2001
From: john muhl <[email-masked]>
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