Questions tagged [eval-after-load]

4 questions
4
votes
2 answers

Wrong type argument: listp, eval-after-load in .dir-locals.el

I'm writing my first .dir-locals.el, and I'm getting an error in *Messages*. Code: (eval-after-load "grep" '(add-to-list 'grep-find-ignored-directories "blur")) Trace: .dir-locals error: Wrong type argument: listp, eval-after-load What am I…
mcandre
  • 22,868
  • 20
  • 88
  • 147
2
votes
1 answer

When to use add-hook, eval-after-load in Emacs

I'v read eval-after-load vs add-hook. According to the page, code in eval-after-load is executed once. On the other hand, code inside add-hook will run every time a buffer of that mode in opened. Ok. But How can I figure out which code should be…
1ambda
  • 1,145
  • 8
  • 19
1
vote
3 answers

Emacs: eval-after-load code always being executed

My .emacs file (emacs 23.4.1) contains python and latex related code. For both there is eval-after-load (code that I want to be executed just once when emacs initiates) and hooks. A relevant part of it is: (setq py-install-directory…
Allan Felipe
  • 201
  • 2
  • 8
1
vote
3 answers

The major mode name of emacs-lisp

I want to load emacs init files faster, so I use the 'eval-after-load. For example, when I load clojure file, I just put (eval-after-load 'clojure-mode 'do-something) It works. But when I try (eval-after-load 'emacs-lisp-mode …
user1001237