-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathewhd-emacs-general.el
39 lines (28 loc) · 1018 Bytes
/
ewhd-emacs-general.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
;; ewhd emacs general configurations -*- lexical-binding: t; -*-
;; Much of this is borrowed from https://github.com/CSRaghunandan/.emacs.d/blob/master/general.el
;;; Emacs version check
(defmacro >=e (version &rest body)
"Emacs VERSION check wrapper around BODY.
BODY can contain both `if' block (for stuff to execute if emacs
is equal or newer than VERSION) and `else' block (for stuff to
execute if emacs is older than VERSION).
Example:
(>=e \"25.0\"
(defun-compatible-with-25.0)
(defun-not-compatible-in-older-version))"
(declare (indent 2)) ;`if'-style indentation where this macro is used
`(if (version<= ,version emacs-version)
,@body))
;;(setq user-mail-address "")
(defun is-mac-p ()
(eq system-type 'darwin))
(defun is-linux-p ()
(eq system-type 'gnu/linux))
(defun is-windows-p ()
(or
(eq system-type 'ms-dos)
(eq system-type 'windows-nt)
(eq system-type 'cygwin)))
;; Allows me to use (require 'general) in another file
(provide 'general)
;;End