GNU bug report logs - #5294
23.1; unload-feature disable minor-mode

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Sat, 2 Jan 2010 21:10:03 UTC

Severity: minor

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kevin Ryde <user42 <at> zip.com.au>
To: bug-gnu-emacs <at> gnu.org
Subject: bug#5294: 23.1; unload-feature disable minor-mode
Date: Sun, 03 Jan 2010 08:09:06 +1100
[Message part 1 (text/plain, inline)]
As an idea for unload-feature, when unloading a buffer-local minor mode
it could helpfully find buffers where the mode is enabled and disable it
before unloading.

An example foo.el mode below.  Eval the code in try-foo.el and it leaves
the buffer boldened, where disabling the mode could have undone it.

Of course foo.el can do something like the commented-out
`foo-unload-function' itself, but I think almost all minor modes would
benefit from this and that `unload-feature' might therefore handle it.

Identifying a minor mode function would be as easy as looking in
`minor-mode-list' would it?  Otherwise I expect define-minor-mode could
chuck some code in `foo-unload-hook' - if it presumes the feature symbol
will match the load filename.


[foo.el (application/emacs-lisp, inline)]
[try-foo.el (application/emacs-lisp, inline)]
[Message part 4 (text/plain, inline)]
In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5)
 of 2009-09-14 on raven, modified by Debian
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

This bug report was last modified 3 years and 119 days ago.

Previous Next


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