practical.org.el
practical.org.el copied to clipboard
Simplify `cond ((locate-library "bbdb") ...)` by using `(when (require 'bbdb nil 'noerror) ...)`
https://github.com/jjuliano/practical.org.el/blob/da0da2ad23da2ed91b9a44f94d251467d414c074/practical.org.el#L303-L304
You could consider rewriting this as
(when (require 'bbdb nil 'noerror)
If bbdb
can't be loaded, this returns nil
, but if it can (or if bbdb
is alreayd loaded), this return bbdb
and the rest of the code will be executed.