Thread View: gnu.emacs.help
1 messages
1 total messages
Started by Randy O'Reilly
Sun, 28 Jan 1996 01:01
C++ Editing Idea: Already Available?
Author: Randy O'Reilly
Date: Sun, 28 Jan 1996 01:01
Date: Sun, 28 Jan 1996 01:01
56 lines
2666 bytes
2666 bytes
Having developed a large C++ library for doing neural network
simulation, we have found that the main problem people face in using
it to develop their own code could be solved by a smart editor that
has the following features. I would like to know if something like
this is already available for UNIX systems, preferably in emacs. If
not, anybody want to write this in elisp? Thanks in advance for any
info!
- Randy
Problem: Can't tell what a function *really* does because it calls
parent version of function, or member functions:
void BpUnit::Compute_Act() {
Unit::Compute_Act(); // do standard activation computation
act += rnd_noise.Gen(); // add random noise
}
Solution: If one could double-click (or whatever) on the
'Unit::Compute_Act()' call above and get something like the following
display:
void BpUnit::Compute_Act() {
Unit::Compute_Act(); { // defined at: ../pdp/netstru.cc:320
act = 1.0 / (1.0 + exp(-net));
}
act += rnd_noise.Gen(); // add random noise
}
which simply provides the definition of the parent function *inline*
in the code (presumably protected from editing, but visible, probably
in a different color or otherwise hilighted as such) and automatically
commented with the location of this in some other source file (which
could then be clicked on to get to the actual source file to edit it).
this could be done with all function calls (on any object, etc):
void BpUnit::Compute_Act() {
Unit::Compute_Act(); { // defined at: ../pdp/netstru.cc:320
act = 1.0 / (1.0 + exp(-net));
}
act += rnd_noise.Gen(); { // defined at: ../ta_misc/random.h:53
return (drand48() * var) + mean;
}
}
after viewing the function definition, another double-click would
revert to the actual text of the current function, etc.
the ability to view code *inline* instead of having to flip back and
forth over 10's of source files is the key to making this useful --
the tags facility in emacs, while better than nothing, does not allow
one to see in one place exactly what is happening, which is so often
useful for people to figure out what you wrote and how they can use
that to suit their own needs. flipping back and forth and trying to
keep things in memory just doesn't work very well.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads