unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73585: [PATCH] Use 'defvar-keymap' in 'lua-ts-mode'
@ 2024-10-01 18:34 john muhl
  2024-10-01 18:37 ` john muhl
  0 siblings, 1 reply; 3+ messages in thread
From: john muhl @ 2024-10-01 18:34 UTC (permalink / raw)
  To: 73585

Tags: patch

Switch to defvar-keymap as previously suggested by Stefan Kangas.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#73585: [PATCH] Use 'defvar-keymap' in 'lua-ts-mode'
  2024-10-01 18:34 bug#73585: [PATCH] Use 'defvar-keymap' in 'lua-ts-mode' john muhl
@ 2024-10-01 18:37 ` john muhl
  2024-10-01 19:41   ` Stefan Kangas
  0 siblings, 1 reply; 3+ messages in thread
From: john muhl @ 2024-10-01 18:37 UTC (permalink / raw)
  To: 73585

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Use-defvar-keymap-in-lua-ts-mode-bug-73585.patch --]
[-- Type: text/x-patch, Size: 1358 bytes --]

From 5de56587ac3d43ad6bf06cf39ba4604d6ef3e249 Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
Date: Mon, 8 Jul 2024 15:54:02 -0500
Subject: [PATCH] Use 'defvar-keymap' in 'lua-ts-mode' (bug#73585)

* lisp/progmodes/lua-ts-mode.el (lua-ts-mode-map): Replace
'defvar' with 'defvar-keymap'.
---
 lisp/progmodes/lua-ts-mode.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
index 06daadbc1fd..dd04a9e7569 100644
--- a/lisp/progmodes/lua-ts-mode.el
+++ b/lisp/progmodes/lua-ts-mode.el
@@ -720,14 +720,11 @@ lua-ts-inferior--write-history
               ((buffer-live-p (process-buffer process))))
     (with-current-buffer buffer (comint-write-input-ring))))
 
-(defvar lua-ts-mode-map
-  (let ((map (make-sparse-keymap "Lua")))
-    (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.")
+(defvar-keymap lua-ts-mode-map
+  "C-c C-n" #'lua-ts-inferior-lua
+  "C-c C-c" #'lua-ts-send-buffer
+  "C-c C-l" #'lua-ts-send-file
+  "C-c C-r" #'lua-ts-send-region)
 
 (easy-menu-define lua-ts-mode-menu lua-ts-mode-map
   "Menu bar entry for `lua-ts-mode'."
-- 
2.46.2


[-- Attachment #2: Type: text/plain, Size: 119 bytes --]



john muhl <jm@pub.pink> writes:

> Tags: patch
>
> Switch to defvar-keymap as previously suggested by Stefan Kangas.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#73585: [PATCH] Use 'defvar-keymap' in 'lua-ts-mode'
  2024-10-01 18:37 ` john muhl
@ 2024-10-01 19:41   ` Stefan Kangas
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2024-10-01 19:41 UTC (permalink / raw)
  To: john muhl, 73585-done

Version: 31.1

john muhl <jm@pub.pink> writes:

> From 5de56587ac3d43ad6bf06cf39ba4604d6ef3e249 Mon Sep 17 00:00:00 2001
> From: john muhl <jm@pub.pink>
> Date: Mon, 8 Jul 2024 15:54:02 -0500
> Subject: [PATCH] Use 'defvar-keymap' in 'lua-ts-mode' (bug#73585)
>
> * lisp/progmodes/lua-ts-mode.el (lua-ts-mode-map): Replace
> 'defvar' with 'defvar-keymap'.

Thanks, installed on master (commit bf3129d5821).  I opted to keep the
docstring, though.  Closing.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-01 19:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 18:34 bug#73585: [PATCH] Use 'defvar-keymap' in 'lua-ts-mode' john muhl
2024-10-01 18:37 ` john muhl
2024-10-01 19:41   ` 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).