Subject: [PATCH] Allow insert other elisp keywords in auto-insert
From: "Elijah G." <[email-masked]>
To: [email-masked]
Date: Sat, 01 Jun 2024 18:17:42 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

Hello,

this little patch allow insert any package keywords when using
auto-insert for insert elisp header lines.

This is more a bugfix, since there is a bug when using Vertico that get
stuck in the keywords part, that bug can also apply to other completion
UIs or frameworks.

Also there are some packages that uses non-standard keywords, i think it
would be better allowing insert other keywords.

In GNU Emacs 30.0.50 (build 1, x86_64-w64-mingw32) of 2024-05-23 built
 on AVALON
Repository revision: 64cced2c37a9926fe6ff1c6ad9b9540abd47e21c
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.19045
System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.4046)

Configured using:
 'configure --with-modules --without-dbus --with-native-compilation --without-compress-install --with-tree-sitter CFLAGS=-O2'

From 89f990c6393d90fd76efb4e3665f431d7c0300b3 Mon Sep 17 00:00:00 2001
From: "Elias G. Perez" <[email-masked]>
Date: Sat, 1 Jun 2024 16:51:54 -0600
Subject: [PATCH] Allow insert other elisp keywords in auto-insert

Allow to user confirm for insert other keywords than
default ones when using auto-insert in an elisp file.

* lisp/autoinsert.el (auto-insert-alist): Use 'confirm' instead
't' in completing-read REQUIRE-MATCH from Emacs Lisp header
template.
---
 lisp/autoinsert.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index f2631422c62..561626e474b 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -212,7 +212,7 @@ auto-insert-alist
 	   finder-known-keywords
 	   "\n"))
  ((let ((minibuffer-help-form v2))
-    (completing-read "Keyword, C-h: " v1 nil t))
+    (completing-read "Keyword, C-h: " v1 nil 'confirm))
     str ", ")
  & -2 "
 
-- 
2.44.0.windows.1