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"))
|
||||
|
||||
(eval-after-load "emms-source-file"
|
||||
'(progn
|
||||
(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")))
|
||||
|
||||
(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))
|
||||
(eval-after-load "emms-source-file" '(oni:emms-init))
|
||||
(eval-after-load "flymake" '(oni:flymake-init))
|
||||
(eval-after-load "ido" '(oni:ido-init))
|
||||
(eval-after-load "jabber" '(oni:jabber-init))
|
||||
(eval-after-load "newst-treeview" '(require 'newsticker-init))
|
||||
(eval-after-load "org" '(require 'org-init))
|
||||
(eval-after-load "rainbow-mode" '(oni:rainbow-mode-init))
|
||||
(eval-after-load "smex" '(oni:smex-init))
|
||||
(eval-after-load "yasnippet" '(oni:yasnippet-init))
|
||||
|
||||
(put 'upcase-region 'disabled nil)
|
||||
(put 'downcase-region 'disabled nil)
|
||||
|
@ -231,6 +175,7 @@
|
|||
(setq redisplay-dont-pause t)
|
||||
(setq send-mail-function 'smtpmail-send-it)
|
||||
(setq sendmail-program "/usr/bin/msmtp")
|
||||
(setq sentence-end-double-space nil)
|
||||
(setq smex-key-advice-ignore-menu-bar t)
|
||||
(setq smex-save-file "~/.emacs.d/smex-items")
|
||||
(setq split-height-threshold 40)
|
||||
|
|
|
@ -50,20 +50,6 @@ DOT are intentionally being skipped."
|
|||
(concat (symbol-name user) "@" (symbol-name host) "."
|
||||
(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 ()
|
||||
"Function for `after-save-hook'."
|
||||
(oni:compile-el)
|
||||
|
@ -130,6 +116,20 @@ DOT are intentionally being skipped."
|
|||
"Function for `emacs-lisp-mode-hook'."
|
||||
(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 ()
|
||||
"Toggle between playing/paused states."
|
||||
(interactive)
|
||||
|
@ -176,6 +176,23 @@ DOT are intentionally being skipped."
|
|||
'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 ()
|
||||
"Function for `flymake-mode-hook'."
|
||||
(local-set-key [M-P] 'flymake-goto-prev-error)
|
||||
|
@ -197,6 +214,19 @@ DOT are intentionally being skipped."
|
|||
(highlight-80+-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)
|
||||
"Rigidly indent region.
|
||||
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))
|
||||
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 ()
|
||||
"Function for `jabber-roster-mode-hook'."
|
||||
(setq mode-line-format
|
||||
|
@ -442,6 +476,10 @@ ignored."
|
|||
(highlight-80+-mode)
|
||||
(whitespace-mode))
|
||||
|
||||
(defun oni:rainbow-mode-init ()
|
||||
"Initialization function for rainbow-mode."
|
||||
(diminish 'rainbow-mode))
|
||||
|
||||
(defun oni:raise-ansi-term (arg)
|
||||
"Create or show an `ansi-term' buffer."
|
||||
(interactive "P")
|
||||
|
@ -565,6 +603,11 @@ insert at the end of the region and at the beginning."
|
|||
(interactive)
|
||||
(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)
|
||||
"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 (kbd "C-\\") 'yas-expand))
|
||||
|
||||
(define-skeleton html-tag
|
||||
"Testing creation of an html tag"
|
||||
"Tagname:"
|
||||
"<" str ("Attribute: " " " str "=\"" (skeleton-read "Value: ") "\"") ">\n"
|
||||
"</" str ">\n")
|
||||
(defun oni:yasnippet-init ()
|
||||
"Initialization function for yasnippet."
|
||||
(diminish 'yas-minor-mode))
|
||||
|
||||
(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)
|
||||
;;; oni.el ends here
|
||||
|
|
Loading…
Reference in a new issue