GNU bug report logs -
#5293
23.1; unload-feature on buffer-local hooks
Previous Next
Reported by: Kevin Ryde <user42 <at> zip.com.au>
Date: Sat, 2 Jan 2010 21:07:02 UTC
Severity: minor
Merged with 34686
Found in version 26.1
Done: Štěpán Němec <stepnem <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Sat, Jan 2, 2010 at 22:06, Kevin Ryde <user42 <at> zip.com.au> wrote:
> When `unload-feature' looks in hooks for functions that it's going to
> unload, it doesn't seem to look in buffer-local values, other than for
> the current buffer.
[...]
> I suppose looking in all buffers is more work for unload-feature, but
> would be a good protection against bad things happening later.
Yes, unload-feature should look at buffer-local values, too.
For the moment being, a package like foo should define a function (foo
in the function name matches the feature name you're unloading):
(defun foo-unload-function ()
;; do whatever is necessary; in foo's case:
(with-current-buffer (get-buffer "foo-bufer")
(remove-hook 'after-change-functions 'foo-message t))
;; continue standard unloading
nil)
that will be automatically called upon unloading foo.el; in most
cases, it should return nil to allow unload-feature to continue the
normal unloading process.
Juanma
This bug report was last modified 4 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.