>>> + (when (boundp 'revert-buffer-function) >>> + (setq revert-buffer-function 'bbdb-revert-buffer)) >> >> I recommend to use (set (make-local-variable <foo>) <bar>) when setting >> a buffer-local variable, even if you know that the variable is >> automatically buffer-local. One of the benefits is that you don't need >> to check `boundp' in that case.
> I check for `boundp' because bbdb might be supposed to work on emacsen > which may lack `revert-buffer-function'. I thought so, but if you use `setq' you also need such a check to make sure the variable has been defined and its make-variable-buffer-local call happened, otherwise even if the variable is "automatically buffer-local" the `setq' will modify the variable globally. That's a good reason to use (set (make-local-variable <foo>) <bar>). As for whether you need `boundp' to set a variable, I think that's not the case: if your Emacs doesn't obey this variable, setting it shouldn't do any harm (it'll just be ignored). Stefan ------------------------------------------------------------------------------ Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/