Questions tagged [eval-after-load]
11 questions
11
votes
1 answer
use-package: Can :after be used instead of with-eval-after-load?
If my :config section is entirely wrapped in with-eval-after-load, is that equivalent to simply specifying an :after directive? That is, can I replace this:
(use-package company-tern
:config
(with-eval-after-load 'company
(add-to-list…

Jorge Israel Peña
- 1,265
- 9
- 17
3
votes
1 answer
How to customize a lazy-loaded variable?
In Spacemacs, how can I customize a variable used in a layer that's loaded lazily?
Specifically, I'm trying to use Zathura and Synctex with Spacemacs' Latex layer. I have the following code in my dotspacemacs/user-config.
(with-eval-after-load…

imperfectgrist
- 225
- 3
- 6
2
votes
1 answer
For convenience, how should I load a package whenever a specific other package loads?
I have a package that enhances the functionality of another package. To save the user the effort of any additional configurating, I would like my package to load automatically if the larger package loads.
(In my example, my package is a Flycheck…

mavit
- 211
- 1
- 5
2
votes
1 answer
Unable to disable binding defined by undo-tree
There are two bindings for undo-tree-undo(C-_ and C-/) and undo-tree-redo(M-_ and C-?) defined in undo-tree, but now I don't want those bindings(delete those), I just want to bind C-z to undo-tree-undo and C-S-z to undo-tree-redo(short and simple),…

CodyChan
- 2,599
- 1
- 19
- 33
1
vote
1 answer
How can I use some package after other some other packages loaded?
I am trying to start dap-mode in my golang project. I already have lsp-mode config set.
for example:
(use-package lsp-mode
:hook
((go-mode . lsp-deferred)
(rust-mode . lsp-deferred)
)
)
What I want is let dap-mode in use-package block, but…

ccQpein
- 123
- 5
1
vote
1 answer
`eval-after-load` gets executed, but syntax-table is missing
In the course of using Emacs I got a dozen of lines that simply make underscore part of a word, and most of them upon byte-compilation are causing warnings like reference to free variable ‘php-mode-syntax-table’.
I asked on IRC how to deal with…

Hi-Angel
- 525
- 6
- 18
0
votes
1 answer
require 'package vs with-eval-after-load 'package
(require 'eglot)
(do-something)
There's another..
(with-eval-after-load 'eglot
(do-something)
)
They seem to do the same, are there any difference?

eugene
- 481
- 1
- 5
- 11
0
votes
1 answer
Why is 'eval-after-load' required here?
(eval-after-load "dired"
'(progn
(define-key dired-mode-map "c" 'dired-create-empty-file)
(define-key dired-mode-map "r" 'dired-do-compress-to)))
Why is the eval-after-load necessary when this is an init file? From my understanding, it…

user129393192
- 135
- 6
0
votes
0 answers
How do I use eval-after-load exactly?
I don't know how to check if eval-after-load works or not.
I used the following code to check if FORM is loaded
(eval-after-load 'org
(message "loaded!"))
After the above is evaluated, I tried the following
reload org buffer
(require…
0
votes
2 answers
eval-after-load doesn't work
I am trying to re-define two functions in two-column.el.gz, namely 2C-split and 2C-merge. Both of those are declared with ;;;###autoload. I gathered I should use (eval-after-load "two-column" ...), because Linux (Ubuntu) won't let me change the…
0
votes
0 answers
How to reevaluate the code in an `eval-after-load`, after the library has been loaded?
I've defined the following :
(eval-after-load 'clojure-mode
'(font-lock-add-keywords
'clojure-mode `(("\\(#\\){"
(0 (progn (compose-region (match-beginning 1)
(match-end 1)
…

cmal
- 775
- 3
- 14