GNU bug report logs -
#8297
expand self-documentation to show where things are redefined, etc
Previous Next
Full log
View this message in rfc822 format
severity 8297 wishlist
thanks
> What I would like is for Emacs to track my customisations:
> - When I redefine an Emacs function I would like a link to the
> previous/original definition, `describe-function' only provides a link to
> the current one.
I'd like to improve the support for redefinition of functions, indeed.
I'm more interested in getting unload-feature to work more reliably, but
it could work for this as well: basically remember the
previous definitions.
Note that for your case, another option is to use a defadvice, and
indeed defadvice should also add a hyperlink to the advice.
> - 'describe-variable', on the other hand, remembers the original
> definition, but doesn't remember the place where I changed the value.
That might turn out to be more difficult to track, but at least for some
simple cases (e.g. when the vlue is changed via `custom' functions rather
than via `setq') that should definitely be doable. If the var was set
via `setq' it's more difficult since `setq' is a very low-level
primitive that needs to run fast. But maybe we could somehow handle
`setq' outside of functions in a special way (these shouldn't impact
performance since they can't be in loops).
> - `describe-key' only provides a link to the function, not to the place the
> key was defined.
That's also more difficult because OT1H `define-key' does not get much
information (it can check load-file-name, but it doesn't know the line
number, nor the name of the map it receives and neither does it know
reliably what the key description looks like in the source file, so it's
hard to do a regexp-search), and OTOH there's no place currently to
store that information, tho I guess we could keep it in some side
hash-table.
> Obviously, this is not easy, because evaluations don't necessarily
> have a fixed place and key bindings can be defined in many ways. Regardless,
> I think this is something on which Emacs could improve.
Agreed. It's not high on my todo list, but I'll be happy to take
patches for those. For defadvice it should be pretty easy, and for
function re-definitions it shouldn't be too hard either.
Stefan
This bug report was last modified 14 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.