summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-04-10 09:27:49 +0200
committerAlan Pearce2017-04-10 09:27:49 +0200
commit1a360328fd32df556f653032bd79f7d8a012df1e (patch)
treeaeef123ce55f00942f925cde82407e80ed545137 /emacs
parent15cee80b0f179ed08fffe0b41976a2749cab363a (diff)
parentc1b163f6790521a80be588a2bc2b8f0cf790061f (diff)
downloadnixfiles-1a360328fd32df556f653032bd79f7d8a012df1e.tar.lz
nixfiles-1a360328fd32df556f653032bd79f7d8a012df1e.tar.zst
nixfiles-1a360328fd32df556f653032bd79f7d8a012df1e.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org39
1 files changed, 24 insertions, 15 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 6290bb45..27f45155 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
@@ -314,21 +322,22 @@ Diminishing major modes does not happen in the same manner as minor
 modes.
 
 #+BEGIN_SRC emacs-lisp
-(use-package cyphejor
-  :defer 2
-  :config (progn
-            (setq cyphejor-rules `(("emacs"       "ε")
-                                   ("diff"        "Δ")
-                                   ("js2"         "js")
-                                   ("magit-status" ,(char-to-string (-find #'char-displayable-p '(11942 5848 177))))
-                                   ("inferior"    "i" :prefix)
-                                   ("interaction" "i" :prefix)
-                                   ("interactive" "i" :prefix)
-                                   ("menu"        "▤" :postfix)
-                                   ("ledger"      "Ledger")
-                                   ("mode"        "")
-                                   ("shell"       "sh" :postfix)))
-            (cyphejor-mode 1)))
+(unless (version<= emacs-version "24.4")
+  (use-package cyphejor
+    :defer 2
+    :config (progn
+              (setq cyphejor-rules `(("emacs"       "ε")
+                                     ("diff"        "Δ")
+                                     ("js2"         "js")
+                                     ("magit-status" ,(char-to-string (-find #'char-displayable-p '(11942 5848 177))))
+                                     ("inferior"    "i" :prefix)
+                                     ("interaction" "i" :prefix)
+                                     ("interactive" "i" :prefix)
+                                     ("menu"        "▤" :postfix)
+                                     ("ledger"      "Ledger")
+                                     ("mode"        "")
+                                     ("shell"       "sh" :postfix)))
+              (cyphejor-mode 1))))
 #+END_SRC