summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-04-09 10:31:55 +0200
committerAlan Pearce2017-04-09 10:31:55 +0200
commit5b20693bf72a419d1b526dcf53f8610fba7a39e0 (patch)
tree10583b963735998bc1a2e9774eee16f84d80956d
parentda106a2392ebebb3cefb425d3f3ba9285a5e647d (diff)
downloadnixfiles-5b20693bf72a419d1b526dcf53f8610fba7a39e0.tar.lz
nixfiles-5b20693bf72a419d1b526dcf53f8610fba7a39e0.tar.zst
nixfiles-5b20693bf72a419d1b526dcf53f8610fba7a39e0.zip
Emacs: Add with-eval-after-load fallback implementation
-rw-r--r--emacs/.emacs.d/init.org8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 6290bb45..a3a30a4b 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -18,6 +18,14 @@ Open Emacs with just a plain window.  No graphics or messages, please!
 (remove-hook 'find-file-hooks #'vc-refresh-state)
 #+END_SRC
 
+** Compatibility
+
+#+BEGIN_SRC emacs-lisp
+(if (version< emacs-version "25.0")
+    (defmacro with-eval-after-load (file &rest body)
+      `(eval-after-load ,file (lambda () ,@body))))
+#+END_SRC
+
 ** Scratch buffers
 I usually use scratch buffers for any sort of text.  If I need a
 programming mode in one, then I’ll just call it manually.  I also like