Next: , Previous: , Up: Interacting With Lisp   [Contents][Index]


9.7 Editing Definitions

The Lisp compiler annotates each compiled function object with the source file that the function was originally defined from. The definition editing commands use this information to locate and edit the source for functions defined in the environment.

Command: Edit Definition
Command: Goto Definition (bound to C-M-F)
Command: Edit Command Definition

Edit Definition prompts for the name of a function, and then uses the current eval server to find out in which file the function is defined. If something other than defun or defmacro defined the function, then this simply reads in the file, without trying to find its definition point within the file. If the function is uncompiled, then this looks for it in the current buffer. If there is no currently valid eval server, then this command uses the editor Lisp’s environment instead of trying to spawn a slave.

Goto Definition edits the definition of the symbol at the beginning of the current list.

Edit Command Definition edits the definition of a Hemlock command. By default, this command does a keyword prompt for the command name (as in an extended command). If a prefix argument is specified, then instead prompt for a key and edit the definition of the command bound to that key.

Command: Add Definition Directory Translation
Command: Delete Definition Directory Translation

The defining file is recorded as an absolute pathname. The definition editing commands have a directory translation mechanism that allow the sources to be found when they are not in the location where compilation was originally done. Add Definition Directory Translation prompts for two directory namestrings and causes the first to be mapped to the second. Longer (more specific) directory specifications are matched before shorter (more general) ones.

Delete Definition Directory Translation prompts for a directory namestring and deletes it from the directory translation table.

Hemlock Variable: Editor Definition Info (initial value nil)

When this variable is true, the editor Lisp is used to determine definition editing information, otherwise the current eval server is used. This variable is true in Eval and Editor modes.


Next: Debugging, Previous: Querying the Environment, Up: Interacting With Lisp   [Contents][Index]