From: Jari Aalto <jari.aalto@cante.net>
To: 8416@debbugs.gnu.org
Subject: bug#8416: easy-mmode.el -- enhance define-minor-mode to define turn-on-* and turn-off-* functions
Date: Sun, 03 Apr 2011 16:42:03 +0300 [thread overview]
Message-ID: <878vvrbges.fsf@picasso.cante.net> (raw)
Package: emacs
Version: 23.2+1-7
Severity: wishlist
It would be nice if the define-minor-mode would also define functions:
turn-on-*
turn-off-*
An example:
;; lisp/hl-line.el
(define-minor-mode hl-line-mode ...)
That would make it possible to add to ~/.emacs:
(add-hook 'nroff-mode-hook 'turn-on-hl-line-mode)
;; Or later:
(remove-hook 'nroff-mode-hook 'turn-on-hl-line-mode)
This would be much more cleaner than what is needed now:
(add-hook 'nroff-mode-hook '(lambda () (turn-on-hl-line-mode 1)))
...
;; the hook removal command is as messy
-- System Information
Debian Release: wheezy/sid
APT Prefers testing
APT policy: (990, testing) (500, unstable) (1, experimental)
Architecture: amd64
Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux
Locale: LANG=en_DK.UTF-8
-- Versions of packages `emacs depends on'.
Depends:
emacs23 23.2+1-7 GNU Emacs is the extensible self-documenting
emacs23-lucid 23.2+1-7 GNU Emacs is the extensible self-documenting
emacs23-nox 23.2+1-7 GNU Emacs is the extensible self-documenting
next reply other threads:[~2011-04-03 13:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-03 13:42 Jari Aalto [this message]
2011-04-03 17:46 ` bug#8416: easy-mmode.el -- enhance define-minor-mode to define turn-on-* and turn-off-* functions Glenn Morris
2011-04-04 14:32 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878vvrbges.fsf@picasso.cante.net \
--to=jari.aalto@cante.net \
--cc=8416@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.