GNU bug report logs - #8416
easy-mmode.el -- enhance define-minor-mode to define turn-on-* and turn-off-* functions

Previous Next

Package: emacs;

Reported by: Jari Aalto <jari.aalto <at> cante.net>

Date: Sun, 3 Apr 2011 13:43:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 23.2+1-7

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 8416-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jari Aalto <jari.aalto <at> cante.net>
Cc: 8416-done <at> debbugs.gnu.org
Subject: Re: bug#8416: easy-mmode.el -- enhance define-minor-mode to define
	turn-on-* and turn-off-* functions
Date: Mon, 04 Apr 2011 10:32:03 -0400
> It would be nice if the define-minor-mode would also define functions:

>     turn-on-*
>     turn-off-*

In Emacs-24, the `foo-mode' function of a minor mode *is* the
turn-on-foo-mode function (at least when called non-interactively
without an argument, e.g. on a normal hook).

> This would be much more cleaner than what is needed now:
>     (add-hook 'nroff-mode-hook '(lambda () (turn-on-hl-line-mode 1)))

As mentioned, the above is not needed any more:

  (add-hook 'nroff-mode-hook 'hl-line-mode)

will work just fine.

The turn-off-foo is rarely needed in my experience.


        Stefan




This bug report was last modified 14 years and 55 days ago.

Previous Next


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