practical.org.el icon indicating copy to clipboard operation
practical.org.el copied to clipboard

Simplify `cond ((locate-library "bbdb") ...)` by using `(when (require 'bbdb nil 'noerror) ...)`

Open pcrama opened this issue 2 years ago • 0 comments

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.

pcrama avatar Mar 25 '22 08:03 pcrama