Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pcrama opened this issue Mar 25, 2022 · 0 comments

Comments

@pcrama
Copy link

pcrama commented Mar 25, 2022

(cond ((locate-library "bbdb")
(require 'bbdb)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant