forked from colonelpanic/dotfiles
More literateization
This commit is contained in:
parent
6cd8dbca9d
commit
6f810fb5df
@ -19,13 +19,22 @@ custom-before.el is loaded before the rest of init.el, while custom-after.el is
|
|||||||
(defvar custom-after-file "~/.emacs.d/custom-after.el")
|
(defvar custom-after-file "~/.emacs.d/custom-after.el")
|
||||||
(when (file-exists-p machine-custom) (load machine-custom))
|
(when (file-exists-p machine-custom) (load machine-custom))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Custom emacs-lisp
|
** GUI Disables
|
||||||
|
Death to any gui elements in emacs! Do this EARLY so that emacs doesn't redisplay in a way that is visually unpleasant on startup a bunch of times.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun emacs24_4-p ()
|
(when (fboundp 'menu-bar-mode) (menu-bar-mode -1))
|
||||||
(or (and (>= emacs-major-version 24)
|
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
|
||||||
(>= emacs-minor-version 4))
|
(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
|
||||||
(>= emacs-major-version 25)))
|
#+END_SRC
|
||||||
|
* Custom emacs-lisp
|
||||||
|
An emacs version predicate builder
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defmacro emacs-version-predicate (major-version minor-version)
|
||||||
|
`(lambda ()
|
||||||
|
(or (> emacs-major-version ,major-version)
|
||||||
|
(and (>= emacs-major-version ,major-version)
|
||||||
|
(>= emacs-minor-version ,minor-version)))))
|
||||||
|
(defalias emacs24_4-p (emacs-version-predicate 24 4))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -34,7 +43,8 @@ custom-before.el is loaded before the rest of init.el, while custom-after.el is
|
|||||||
|
|
||||||
* Packages
|
* Packages
|
||||||
** Essential
|
** Essential
|
||||||
Helm for almost all emacs completion
|
*** helm
|
||||||
|
I use helm for almost all emacs completion
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package helm-config
|
(use-package helm-config
|
||||||
:ensure helm
|
:ensure helm
|
||||||
@ -144,6 +154,22 @@ Helm for almost all emacs completion
|
|||||||
(helm-mode 1)
|
(helm-mode 1)
|
||||||
(diminish 'helm-mode)))
|
(diminish 'helm-mode)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
*** magit
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package magit
|
||||||
|
:commands magit-status
|
||||||
|
:bind (("C-x g" . magit-status))
|
||||||
|
:config
|
||||||
|
(progn
|
||||||
|
(defvar-setq magit-last-seen-setup-instructions "1.4.0")
|
||||||
|
(magit-auto-revert-mode)
|
||||||
|
(use-package magit-filenotify
|
||||||
|
;; Seems like OSX does not support filenotify.
|
||||||
|
:disabled t
|
||||||
|
:if (funcall o(emacs-version-predicate 24 4))
|
||||||
|
:config
|
||||||
|
:init (add-hook 'magit-status-mode-hook 'magit-filenotify-mode))))
|
||||||
|
#+END_SRC
|
||||||
** Major-Mode
|
** Major-Mode
|
||||||
* Keybindings
|
* Keybindings
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -175,22 +201,14 @@ Helm for almost all emacs completion
|
|||||||
(quote ([1 67108896 19 100 6 23 40 19 41 return
|
(quote ([1 67108896 19 100 6 23 40 19 41 return
|
||||||
backspace 32 46 6 4] 0 "%d")) arg)))
|
backspace 32 46 6 4] 0 "%d")) arg)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* TODO Make the stuff under this heading literate
|
** OSX
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
||||||
(when (equal system-type 'darwin)
|
(when (equal system-type 'darwin)
|
||||||
(setq mac-option-modifier 'meta)
|
(setq mac-option-modifier 'meta)
|
||||||
(setq mac-command-modifier 'super))
|
(setq mac-command-modifier 'super))
|
||||||
|
#+END_SRC
|
||||||
|
* TODO Make the stuff under this heading literate
|
||||||
;; =============================================================================
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; GUI Disables
|
|
||||||
;; =============================================================================
|
|
||||||
|
|
||||||
;; Turn off mouse interface early in startup to avoid momentary display
|
|
||||||
(when (fboundp 'menu-bar-mode) (menu-bar-mode -1))
|
|
||||||
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
|
|
||||||
(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
|
|
||||||
|
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
;; byte-compiler
|
;; byte-compiler
|
||||||
@ -904,20 +922,6 @@ buffer is not visiting a file."
|
|||||||
:disabled t
|
:disabled t
|
||||||
:config (github-notifier-mode))
|
:config (github-notifier-mode))
|
||||||
|
|
||||||
(use-package magit
|
|
||||||
:commands magit-status
|
|
||||||
:bind (("C-x g" . magit-status))
|
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
(defvar-setq magit-last-seen-setup-instructions "1.4.0")
|
|
||||||
(magit-auto-revert-mode)
|
|
||||||
(use-package magit-filenotify
|
|
||||||
;; Seems like OSX does not support filenotify.
|
|
||||||
:disabled t
|
|
||||||
:if (emacs24_4-p)
|
|
||||||
:config
|
|
||||||
:init (add-hook 'magit-status-mode-hook 'magit-filenotify-mode))))
|
|
||||||
|
|
||||||
(use-package company
|
(use-package company
|
||||||
:commands company-mode imalison:company
|
:commands company-mode imalison:company
|
||||||
:bind (("C-\\" . imalison:company))
|
:bind (("C-\\" . imalison:company))
|
||||||
|
Loading…
Reference in New Issue
Block a user