GNU bug report logs - #79178
[Improvement] Allow auto-insert to have functions as conditions

Previous Next

Package: emacs;

Reported by: Mattias <mattias <at> kojin.tech>

Date: Tue, 5 Aug 2025 16:18:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias <mattias <at> kojin.tech>
Cc: 79178 <at> debbugs.gnu.org
Subject: bug#79178: [Improvement] Allow auto-insert to have functions as conditions
Date: Thu, 07 Aug 2025 16:04:48 +0300
> Date: Wed, 6 Aug 2025 16:46:25 +0200
> Cc: 79178 <at> debbugs.gnu.org
> From: Mattias <mattias <at> kojin.tech>
> 
> Thanks for the review!
> 
> I think I did everything you asked, let me know if there's something 
> missing or not done properly ;-)

Thanks, a couple of minor comments below.

> * lisp/autoinsert.el:
> (auto-insert-alist): Add the new condition type to the variable
> documentation
> (auto-insert): Change the way the condition is matched to allow for
> custom predicates

This should be formatted as below:

* lisp/autoinsert.el: (auto-insert-alist): Add the new condition
type to the variable documentation.
(auto-insert): Change the way the condition is matched to allow for
custom predicates.

It is best to use change-log-mode for formatting commit log messages,
as it will allow you to use M-q and other conveniences, and will obey
the formatting according to our conventions.  Also, don't forget the
periods at the end of each sentence (I added them above).

> +** Autoinsert
> +
> +*** New condition for 'auto-insert-alist'.
> +'auto-insert-alist' now also allows to have a predicate taking no argument
> +as conditions. This allows to trigger 'auto-insert' with finer grained control.

Our convention is to leave 2 spaces between sentences.  Also, since
the manual was updated, the NEWS entry should be marked with "+++"
(see the explanation at the beginning of NEWS).




This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.