>> The first solution binds the <varN> variables lexically rather than >> dynamically. That means that if those <varN> appear lexically inside >> the <form> things will work correctly, but if <form> calls a function >> which then refers to <varN> this reference will fail. > Thank you for the clarification. The code in bbdb-anniv binds the > variables lexcially via let which also contains the call of eval. > So this is fine.
Not sure I understand. You seem to describe something like (let ((x1 v1)) ... (eval exp) ...) in which case the evaluation of `exp' will not have access to `x1'. What I suggested was (eval exp `((x1 . ,v1))) in which case the value of `exp' can contain references to `x1'. But it's still different from a dynamic-binding of `x1', because (let ((exp '(+ x1 4))) (eval exp `((x1 . 5)))) will correctly return 9, but (defun my-f (y) (+ x1 y)) (let ((exp '(my-f 4))) (eval exp `((x1 . 5)))) will signal en error because `x1' is not visible to `my-f' (it's only visible lexically within `exp'). In many cases, this is perfectly acceptable, in which case it's the solution I recommend. Stefan ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/