Subject: RE: [External] : bug#76535: Recommend against turn-on-<FOO>-mode functions

From: Drew Adams <[email-masked]>
Date: Tue, 25 Feb 2025 02:18:02 +0000

> Severity: wishlist
> 
> How about adding to tips.texi a recommendation not to add any new
> functions like these?
> 
>     (defun turn-on-<FOO>-mode ()
>       (<FOO>-mode 1))
>     (defun turn-off-<FOO>-mode ()
>       (<FOO>-mode -1))
> 
> I think they are redundant in almost all cases, but it seems to me that
> they are sometimes added pretty much routinely.

They aren't redundant for global minor modes created using
`define-global-minor-mode' and `define-globalized-minor-mode',
AFAIK.  Arg TURN-ON is a required argument.

  TURN-ON is a function that will be called with no args in every buffer
  and that should try to turn MODE on if applicable for that buffer.