Emacs: Cleanup `eval-after-load's
Also set `sentence-end-double-space' to nil so I don't have to use double spaces to end a sentence and keep the fill functions happy.
This commit is contained in:
parent
12b9beddbd
commit
521ef4749f
2 changed files with 84 additions and 84 deletions
|
@ -8,71 +8,15 @@
|
||||||
|
|
||||||
(load (concat user-emacs-directory "init2"))
|
(load (concat user-emacs-directory "init2"))
|
||||||
|
|
||||||
(eval-after-load "emms-source-file"
|
(eval-after-load "emms-source-file" '(oni:emms-init))
|
||||||
'(progn
|
(eval-after-load "flymake" '(oni:flymake-init))
|
||||||
(require 'emms-setup)
|
(eval-after-load "ido" '(oni:ido-init))
|
||||||
(require 'emms-player-mpd)
|
(eval-after-load "jabber" '(oni:jabber-init))
|
||||||
|
(eval-after-load "newst-treeview" '(require 'newsticker-init))
|
||||||
(emms-standard)
|
(eval-after-load "org" '(require 'org-init))
|
||||||
|
(eval-after-load "rainbow-mode" '(oni:rainbow-mode-init))
|
||||||
(add-to-list 'emms-info-functions 'emms-info-mpd)
|
(eval-after-load "smex" '(oni:smex-init))
|
||||||
(add-to-list 'emms-player-list 'emms-player-mpd)
|
(eval-after-load "yasnippet" '(oni:yasnippet-init))
|
||||||
|
|
||||||
(setq emms-player-mpd-server-name "localhost")
|
|
||||||
(setq emms-player-mpd-server-port "6600")
|
|
||||||
(setq emms-player-mpd-music-directory "/mnt/music/mp3")))
|
|
||||||
|
|
||||||
(eval-after-load "flymake"
|
|
||||||
'(progn
|
|
||||||
(require 'flymake-cursor)
|
|
||||||
|
|
||||||
(add-to-list ; Make sure pyflakes is loaded
|
|
||||||
'flymake-allowed-file-name-masks ; for python files.
|
|
||||||
'("\\.py\\'" ext:flymake-pyflakes-init))
|
|
||||||
|
|
||||||
(add-to-list ; Error line repexp for go
|
|
||||||
'flymake-err-line-patterns ; compilation.
|
|
||||||
'("^\\([a-zA-Z0-9_]+\\.go\\):\\([0-9]+\\):\\(.*\\)$"
|
|
||||||
1 2 nil 3))
|
|
||||||
|
|
||||||
(add-to-list ; Go uses makefiles, makes
|
|
||||||
'flymake-allowed-file-name-masks ; flymaking 'easy'.
|
|
||||||
'("\\.go$" flymake-simple-make-init))))
|
|
||||||
|
|
||||||
(eval-after-load "ido"
|
|
||||||
'(setq ido-ignore-buffers
|
|
||||||
(list "^\\` " "^irc\\." "^\\#" "^\\*Customize Option:"
|
|
||||||
(eval-when-compile
|
|
||||||
(regexp-opt
|
|
||||||
'("*-jabber-roster-*"
|
|
||||||
"*Messages*"
|
|
||||||
"*fsm-debug*"
|
|
||||||
"*magit-process*"
|
|
||||||
"*magit-edit-log*"
|
|
||||||
"*Backtrace*"))))))
|
|
||||||
|
|
||||||
(eval-after-load "jabber"
|
|
||||||
'(remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo))
|
|
||||||
|
|
||||||
(eval-after-load "newst-treeview"
|
|
||||||
'(require 'newsticker-init))
|
|
||||||
|
|
||||||
(eval-after-load "org"
|
|
||||||
'(require 'org-init))
|
|
||||||
|
|
||||||
(eval-after-load "pretty-symbols-mode"
|
|
||||||
'(diminish 'pretty-symbols-mode))
|
|
||||||
|
|
||||||
(eval-after-load "rainbow-mode"
|
|
||||||
'(diminish 'rainbow-mode))
|
|
||||||
|
|
||||||
(eval-after-load "smex"
|
|
||||||
'(progn
|
|
||||||
(global-set-key (kbd "M-x") 'smex)
|
|
||||||
(global-set-key (kbd "C-M-x") 'smex-major-mode-commands)))
|
|
||||||
|
|
||||||
(eval-after-load "yasnippet"
|
|
||||||
'(diminish 'yas-minor-mode))
|
|
||||||
|
|
||||||
(put 'upcase-region 'disabled nil)
|
(put 'upcase-region 'disabled nil)
|
||||||
(put 'downcase-region 'disabled nil)
|
(put 'downcase-region 'disabled nil)
|
||||||
|
@ -231,6 +175,7 @@
|
||||||
(setq redisplay-dont-pause t)
|
(setq redisplay-dont-pause t)
|
||||||
(setq send-mail-function 'smtpmail-send-it)
|
(setq send-mail-function 'smtpmail-send-it)
|
||||||
(setq sendmail-program "/usr/bin/msmtp")
|
(setq sendmail-program "/usr/bin/msmtp")
|
||||||
|
(setq sentence-end-double-space nil)
|
||||||
(setq smex-key-advice-ignore-menu-bar t)
|
(setq smex-key-advice-ignore-menu-bar t)
|
||||||
(setq smex-save-file "~/.emacs.d/smex-items")
|
(setq smex-save-file "~/.emacs.d/smex-items")
|
||||||
(setq split-height-threshold 40)
|
(setq split-height-threshold 40)
|
||||||
|
|
|
@ -50,20 +50,6 @@ DOT are intentionally being skipped."
|
||||||
(concat (symbol-name user) "@" (symbol-name host) "."
|
(concat (symbol-name user) "@" (symbol-name host) "."
|
||||||
(symbol-name com)))
|
(symbol-name com)))
|
||||||
|
|
||||||
(defvar oni:mailbox-map
|
|
||||||
'("top" ("menu"
|
|
||||||
("ryulash.org" . "ryuslash")
|
|
||||||
("ninthfloor" . "ninthfloor")
|
|
||||||
("gmail" . "gmail")
|
|
||||||
("aethon" . "aethon")))
|
|
||||||
"A mailbox map for use with `tmm-prompt'.")
|
|
||||||
|
|
||||||
(defvar oni:required-packages
|
|
||||||
'(graphviz-dot-mode htmlize magit rainbow-delimiters rainbow-mode
|
|
||||||
yasnippet markdown-mode flymake flymake-cursor sauron expand-region
|
|
||||||
git-auto-commit-mode idomenu magit smex)
|
|
||||||
"List of all the packages I have (want) installed.")
|
|
||||||
|
|
||||||
(defun oni:after-save-func ()
|
(defun oni:after-save-func ()
|
||||||
"Function for `after-save-hook'."
|
"Function for `after-save-hook'."
|
||||||
(oni:compile-el)
|
(oni:compile-el)
|
||||||
|
@ -130,6 +116,20 @@ DOT are intentionally being skipped."
|
||||||
"Function for `emacs-lisp-mode-hook'."
|
"Function for `emacs-lisp-mode-hook'."
|
||||||
(eldoc-mode))
|
(eldoc-mode))
|
||||||
|
|
||||||
|
(defun oni:emms-init ()
|
||||||
|
"Initialization function for EMMS."
|
||||||
|
(require 'emms-setup)
|
||||||
|
(require 'emms-player-mpd)
|
||||||
|
|
||||||
|
(emms-standard)
|
||||||
|
|
||||||
|
(add-to-list 'emms-info-functions 'emms-info-mpd)
|
||||||
|
(add-to-list 'emms-player-list 'emms-player-mpd)
|
||||||
|
|
||||||
|
(setq emms-player-mpd-server-name "localhost")
|
||||||
|
(setq emms-player-mpd-server-port "6600")
|
||||||
|
(setq emms-player-mpd-music-directory "/mnt/music/mp3"))
|
||||||
|
|
||||||
(defun oni:emms-toggle-playing ()
|
(defun oni:emms-toggle-playing ()
|
||||||
"Toggle between playing/paused states."
|
"Toggle between playing/paused states."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -176,6 +176,23 @@ DOT are intentionally being skipped."
|
||||||
'face `(:foreground "blue"))
|
'face `(:foreground "blue"))
|
||||||
"> ")))
|
"> ")))
|
||||||
|
|
||||||
|
(defun oni:flymake-init ()
|
||||||
|
"Initialization function for flymake."
|
||||||
|
(require 'flymake-cursor)
|
||||||
|
|
||||||
|
(add-to-list ; Make sure pyflakes is loaded
|
||||||
|
'flymake-allowed-file-name-masks ; for python files.
|
||||||
|
'("\\.py\\'" ext:flymake-pyflakes-init))
|
||||||
|
|
||||||
|
(add-to-list ; Error line repexp for go
|
||||||
|
'flymake-err-line-patterns ; compilation.
|
||||||
|
'("^\\([a-zA-Z0-9_]+\\.go\\):\\([0-9]+\\):\\(.*\\)$"
|
||||||
|
1 2 nil 3))
|
||||||
|
|
||||||
|
(add-to-list ; Go uses makefiles, makes
|
||||||
|
'flymake-allowed-file-name-masks ; flymaking 'easy'.
|
||||||
|
'("\\.go$" flymake-simple-make-init)))
|
||||||
|
|
||||||
(defun oni:flymake-mode-func ()
|
(defun oni:flymake-mode-func ()
|
||||||
"Function for `flymake-mode-hook'."
|
"Function for `flymake-mode-hook'."
|
||||||
(local-set-key [M-P] 'flymake-goto-prev-error)
|
(local-set-key [M-P] 'flymake-goto-prev-error)
|
||||||
|
@ -197,6 +214,19 @@ DOT are intentionally being skipped."
|
||||||
(highlight-80+-mode)
|
(highlight-80+-mode)
|
||||||
(flycheck-mode))
|
(flycheck-mode))
|
||||||
|
|
||||||
|
(defun oni:ido-init ()
|
||||||
|
"Initialization functionn for ido."
|
||||||
|
(setq ido-ignore-buffers
|
||||||
|
(list "^\\` " "^irc\\." "^\\#" "^\\*Customize Option:"
|
||||||
|
(eval-when-compile
|
||||||
|
(regexp-opt
|
||||||
|
'("*-jabber-roster-*"
|
||||||
|
"*Messages*"
|
||||||
|
"*fsm-debug*"
|
||||||
|
"*magit-process*"
|
||||||
|
"*magit-edit-log*"
|
||||||
|
"*Backtrace*"))))))
|
||||||
|
|
||||||
(defun oni:indent-shift-left (start end &optional count)
|
(defun oni:indent-shift-left (start end &optional count)
|
||||||
"Rigidly indent region.
|
"Rigidly indent region.
|
||||||
Region is from START to END. Move
|
Region is from START to END. Move
|
||||||
|
@ -249,6 +279,10 @@ If COUNT has been specified indent by that much, otherwise look at
|
||||||
'(global-mode-string))
|
'(global-mode-string))
|
||||||
header-line-format nil))
|
header-line-format nil))
|
||||||
|
|
||||||
|
(defun oni:jabber-init ()
|
||||||
|
"Initialization function for jabber."
|
||||||
|
(remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo))
|
||||||
|
|
||||||
(defun oni:jabber-roster-mode-func ()
|
(defun oni:jabber-roster-mode-func ()
|
||||||
"Function for `jabber-roster-mode-hook'."
|
"Function for `jabber-roster-mode-hook'."
|
||||||
(setq mode-line-format
|
(setq mode-line-format
|
||||||
|
@ -442,6 +476,10 @@ ignored."
|
||||||
(highlight-80+-mode)
|
(highlight-80+-mode)
|
||||||
(whitespace-mode))
|
(whitespace-mode))
|
||||||
|
|
||||||
|
(defun oni:rainbow-mode-init ()
|
||||||
|
"Initialization function for rainbow-mode."
|
||||||
|
(diminish 'rainbow-mode))
|
||||||
|
|
||||||
(defun oni:raise-ansi-term (arg)
|
(defun oni:raise-ansi-term (arg)
|
||||||
"Create or show an `ansi-term' buffer."
|
"Create or show an `ansi-term' buffer."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
@ -565,6 +603,11 @@ insert at the end of the region and at the beginning."
|
||||||
(interactive)
|
(interactive)
|
||||||
(message (format "%d:%d" (line-number-at-pos) (current-column))))
|
(message (format "%d:%d" (line-number-at-pos) (current-column))))
|
||||||
|
|
||||||
|
(defun oni:smex-init ()
|
||||||
|
"Initialization function for smex."
|
||||||
|
(global-set-key (kbd "M-x") 'smex)
|
||||||
|
(global-set-key (kbd "C-M-x") 'smex-major-mode-commands))
|
||||||
|
|
||||||
(defun oni:split-window-interactive (dir)
|
(defun oni:split-window-interactive (dir)
|
||||||
"Split windows in direction DIR.
|
"Split windows in direction DIR.
|
||||||
|
|
||||||
|
@ -629,11 +672,23 @@ for easy selection."
|
||||||
(define-key yas-minor-mode-map [(tab)] nil)
|
(define-key yas-minor-mode-map [(tab)] nil)
|
||||||
(define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand))
|
(define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand))
|
||||||
|
|
||||||
(define-skeleton html-tag
|
(defun oni:yasnippet-init ()
|
||||||
"Testing creation of an html tag"
|
"Initialization function for yasnippet."
|
||||||
"Tagname:"
|
(diminish 'yas-minor-mode))
|
||||||
"<" str ("Attribute: " " " str "=\"" (skeleton-read "Value: ") "\"") ">\n"
|
|
||||||
"</" str ">\n")
|
(defvar oni:mailbox-map
|
||||||
|
'("top" ("menu"
|
||||||
|
("ryulash.org" . "ryuslash")
|
||||||
|
("ninthfloor" . "ninthfloor")
|
||||||
|
("gmail" . "gmail")
|
||||||
|
("aethon" . "aethon")))
|
||||||
|
"A mailbox map for use with `tmm-prompt'.")
|
||||||
|
|
||||||
|
(defvar oni:required-packages
|
||||||
|
'(graphviz-dot-mode htmlize magit rainbow-delimiters rainbow-mode
|
||||||
|
yasnippet markdown-mode flymake flymake-cursor sauron expand-region
|
||||||
|
git-auto-commit-mode idomenu magit smex)
|
||||||
|
"List of all the packages I have (want) installed.")
|
||||||
|
|
||||||
(provide 'oni)
|
(provide 'oni)
|
||||||
;;; oni.el ends here
|
;;; oni.el ends here
|
||||||
|
|
Loading…
Reference in a new issue