From 5b20693bf72a419d1b526dcf53f8610fba7a39e0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 9 Apr 2017 10:31:55 +0200 Subject: Emacs: Add with-eval-after-load fallback implementation --- emacs/.emacs.d/init.org | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'emacs') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 6290bb4..a3a30a4 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 -- cgit 1.4.1 From cf641adb86b549bcbdd2c696923dd853309c2930 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 9 Apr 2017 10:43:27 +0200 Subject: Emacs: Don't try to setup cyphejor on old Emacsen --- emacs/.emacs.d/init.org | 1 + 1 file changed, 1 insertion(+) (limited to 'emacs') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index a3a30a4..cf6ce16 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -324,6 +324,7 @@ modes. #+BEGIN_SRC emacs-lisp (use-package cyphejor :defer 2 + :if (not (version<= emacs-version "24.4")) :config (progn (setq cyphejor-rules `(("emacs" "ε") ("diff" "Δ") -- cgit 1.4.1 From c1b163f6790521a80be588a2bc2b8f0cf790061f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 9 Apr 2017 11:46:01 +0200 Subject: Emacs: Don't try to setup cyphejor on old Emacsen (v2) --- emacs/.emacs.d/init.org | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'emacs') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index cf6ce16..27f4515 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -322,22 +322,22 @@ Diminishing major modes does not happen in the same manner as minor modes. #+BEGIN_SRC emacs-lisp -(use-package cyphejor - :defer 2 - :if (not (version<= emacs-version "24.4")) - :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 -- cgit 1.4.1