0
(require 'eglot)
(do-something)

There's another..

(with-eval-after-load 'eglot
  (do-something)
)

They seem to do the same, are there any difference?

1 Answer 1

0

Read their descriptions. Not at all the same.

with-eval-after-load doesn't load its first argument; require does.

Even if the require fails in your scenario, (do-something) is invoked. In the other case it's not invoked unless eglot has been successfully loaded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.