Skip to main content
Share Your Experience: Take the 2024 Developer Survey
7 votes
Accepted

What is the difference between `with-eval-after-load` and `eval-after-load`?

Start with the first line of the help buffer: with-eval-after-load is a Lisp macro in ‘subr.el’. eval-after-load is a native-compiled Lisp function in ‘subr.el’. See anything different about them? ...
db48x's user avatar
  • 18.3k
2 votes

For convenience, how should I load a package whenever a specific other package loads?

Use autoload for specific commands etc. Use require if your library depends on another. That's the main question to ask yourself: does your library need the other library? If so, require it. You can ...
Drew's user avatar
  • 77.9k
1 vote
Accepted

Why is 'eval-after-load' required here?

isn't the init file also loaded once? Yes, it is loaded once. Loaded when you launch Emacs. See <https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html>. Why is the ...
shynur's user avatar
  • 5,318
1 vote

How can I use some package after other some other packages loaded?

(with-eval-after-load 'lsp-mode (require 'dap-mode)) or (eval-after-load 'lsp-mode '(require 'dap-mode)) C-h f with-eval-after-load says: with-eval-after-load is a Lisp macro in subr.el. (with-eval-...
Drew's user avatar
  • 77.9k
1 vote

eval-after-load doesn't work

It's hard to give a precise answer because you don't show the actual shape of your code, but it's quite possible that the problem is that your code is simply not being evaluated. I have a side-answer ...
Stefan's user avatar
  • 26.5k
1 vote
Accepted

`eval-after-load` gets executed, but syntax-table is missing

You are missing quotes ' on many of your examples. i.e., (eval-after-load 'haskell-mode (modify-syntax-entry ?_ "w" haskell-mode-syntax-table)) That means the unquoted bit, i.e., (modify-syntax-...
Tyler's user avatar
  • 22.3k

Only top scored, non community-wiki answers of a minimum length are eligible