Skip to content

Commit

Permalink
core: Add with-eval-after-load backport
Browse files Browse the repository at this point in the history
  • Loading branch information
justbur authored and syl20bnr committed Sep 28, 2015
1 parent 560d2ac commit 1898cdc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/core-emacs-backports.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,12 @@
"Check whether STRING is empty."
(string= string "")))

(unless (fboundp 'with-eval-after-load)
(defmacro with-eval-after-load (file &rest body)
"Execute BODY after FILE is loaded.
FILE is normally a feature name, but it can also be a file name,
in case that file does not provide any feature."
(declare (indent 1) (debug t))
`(eval-after-load ,file (lambda () ,@body))))

(provide 'core-emacs-backports)

0 comments on commit 1898cdc

Please sign in to comment.