Luke Gorrie luke@synap.se writes:
Peter Seibel peter@gigamonkeys.com writes:
Since variables in elisp are by default dynamically scoped, is there a coding convention for when you mean to take advantage of a variable being dynamic?
The convention that comes to mind is to only do this with variables that have been defvar'd and not just use it as a cheesy way to avoid passing parameters to subroutines.
Well, the situation is this: in slime (the function) I have a piece of information which eventually needs to get hung off the connection object. I can either add a parameter to a half-dozen functions between slime and the function that actually gets the connection object or I can bind a dynamic variable (which I'm happy to defvar). Which do you prefer?
-Peter