2012-09-07 15:21:59 +02:00
|
|
|
;;; init.el --- ryuslash's emacs init
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;; Does so much and changes so often
|
|
|
|
|
2012-08-26 21:50:26 +02:00
|
|
|
(require 'geiser-install)
|
|
|
|
(require 'iso-transl)
|
|
|
|
(require 'newcomment)
|
|
|
|
(require 'uniquify)
|
|
|
|
(require 'w3m-load)
|
|
|
|
|
2012-09-07 15:21:59 +02:00
|
|
|
;;; Code:
|
|
|
|
|
2012-08-18 13:57:56 +02:00
|
|
|
(eval-and-compile
|
|
|
|
(package-initialize)
|
|
|
|
|
|
|
|
(mapc #'(lambda (directory)
|
2012-08-19 00:26:15 +02:00
|
|
|
(add-to-list 'load-path directory)
|
|
|
|
(let ((default-directory directory))
|
|
|
|
(normal-top-level-add-subdirs-to-load-path)))
|
|
|
|
'("/usr/share/emacs/site-lisp" "~/.emacs.d/site-lisp"))
|
|
|
|
(add-to-list 'load-path "~/.emacs.d/"))
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-10-11 21:23:32 +02:00
|
|
|
(require 'ext)
|
2012-10-07 22:13:55 +02:00
|
|
|
(require 'mode-icons)
|
2012-10-11 21:23:32 +02:00
|
|
|
(require 'oni)
|
2012-10-07 22:13:55 +02:00
|
|
|
|
2012-09-15 13:38:08 +02:00
|
|
|
(autoload 'define-slime-contrib "slime")
|
2012-08-26 21:50:26 +02:00
|
|
|
(autoload 'gtags-mode "gtags" nil t)
|
2012-08-18 13:57:56 +02:00
|
|
|
(autoload 'identica-mode "identica-mode" nil t)
|
2012-09-15 13:38:08 +02:00
|
|
|
(autoload 'jabber-connect "jabber" nil t)
|
2012-08-18 13:57:56 +02:00
|
|
|
(autoload 'mu4e "mu4e" nil t)
|
2012-08-26 21:50:26 +02:00
|
|
|
(autoload 'php-mode "php-mode" nil t)
|
|
|
|
(autoload 'po-mode "po-mode" nil t)
|
|
|
|
(autoload 'pony-mode "pony-mode" nil t)
|
|
|
|
(autoload 'sawfish-mode "sawfish" nil t)
|
2012-09-15 13:38:08 +02:00
|
|
|
(autoload 'server-running-p "server")
|
2012-09-13 10:38:37 +02:00
|
|
|
(autoload 'slime-js-minor-mode "slime-js" nil t)
|
2012-09-15 13:38:08 +02:00
|
|
|
(autoload 'xmodmap-mode "xmodmap-mode" nil t)
|
2012-08-26 21:50:26 +02:00
|
|
|
|
2012-08-19 00:26:15 +02:00
|
|
|
(load (expand-file-name "~/.emacs.d/site-lisp/loaddefs.el"))
|
2012-08-26 21:50:26 +02:00
|
|
|
|
|
|
|
(define-key key-translation-map (kbd "C-j") (kbd "C-l"))
|
|
|
|
(define-key key-translation-map (kbd "C-l") (kbd "C-j"))
|
|
|
|
|
2012-08-18 13:57:56 +02:00
|
|
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
|
|
|
|
2012-08-26 21:50:26 +02:00
|
|
|
(eval-after-load "ebuff-menu"
|
|
|
|
'(define-key electric-buffer-menu-mode-map
|
|
|
|
(kbd "C-s") 'isearch-forward))
|
|
|
|
|
|
|
|
(eval-after-load "em-term"
|
|
|
|
'(add-to-list 'eshell-visual-commands
|
|
|
|
"unison"))
|
|
|
|
|
|
|
|
(eval-after-load "emms-source-file"
|
|
|
|
'(progn
|
|
|
|
(require 'emms-setup)
|
|
|
|
|
|
|
|
(emms-standard)
|
|
|
|
(require 'emms-player-mpd)
|
|
|
|
|
|
|
|
(setq emms-player-mpd-server-name "localhost")
|
|
|
|
(setq emms-player-mpd-server-port "6600")
|
|
|
|
|
|
|
|
(add-to-list 'emms-info-functions 'emms-info-mpd)
|
|
|
|
(add-to-list 'emms-player-list 'emms-player-mpd)
|
|
|
|
(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.
|
2012-10-11 21:23:32 +02:00
|
|
|
'("\\.py\\'" ext:flymake-pyflakes-init))
|
2012-08-26 21:50:26 +02:00
|
|
|
|
|
|
|
(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 `(,@ido-ignore-buffers
|
|
|
|
"^\\*.*\\*$" "^irc\\." "^\\#")))
|
|
|
|
|
2012-08-19 00:26:15 +02:00
|
|
|
(eval-after-load "info"
|
|
|
|
'(require 'info+))
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-10-17 00:38:29 +02:00
|
|
|
(eval-after-load "jabber"
|
|
|
|
'(remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo))
|
|
|
|
|
2012-08-26 21:50:26 +02:00
|
|
|
(eval-after-load "org"
|
|
|
|
'(progn
|
|
|
|
(require 'appt)
|
|
|
|
(require 'org-protocol)
|
|
|
|
(require 'org-habit)
|
|
|
|
(require 'org-contacts)
|
|
|
|
|
|
|
|
(add-to-list 'org-modules 'habit)
|
|
|
|
|
|
|
|
(org-indent-mode t)
|
|
|
|
|
|
|
|
(org-agenda-to-appt)
|
|
|
|
(ad-activate 'org-agenda-redo)))
|
|
|
|
|
|
|
|
(eval-after-load "org-crypt"
|
|
|
|
'(org-crypt-use-before-save-magic))
|
|
|
|
|
|
|
|
(eval-after-load "sauron"
|
|
|
|
'(setq sauron-modules (append '(sauron-identica sauron-jabber)
|
|
|
|
sauron-modules)))
|
|
|
|
|
|
|
|
(eval-after-load "smex"
|
|
|
|
'(progn
|
|
|
|
(global-set-key (kbd "M-x") 'smex)
|
|
|
|
(global-set-key (kbd "C-M-x") 'smex-major-mode-commands)))
|
|
|
|
|
2012-08-24 10:51:47 +02:00
|
|
|
(oni:define-mailbox "aethon"
|
|
|
|
(oni:email thomas at aethon dot nl)
|
2012-08-18 13:57:56 +02:00
|
|
|
(expand-file-name "~/documents/work/aethon/signature.txt"))
|
2012-08-24 10:51:47 +02:00
|
|
|
(oni:define-mailbox "gmail" (oni:email ryuslash at gmail dot com))
|
|
|
|
(oni:define-mailbox "ninthfloor"
|
|
|
|
(oni:email ryuslash at ninthfloor dot org))
|
|
|
|
(oni:define-mailbox "ryuslash" (oni:email tom at ryuslash dot org)
|
|
|
|
nil "ryuslash.org")
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-08-26 21:50:26 +02:00
|
|
|
(put 'upcase-region 'disabled nil)
|
|
|
|
(put 'downcase-region 'disabled nil)
|
|
|
|
(put 'narrow-to-region 'disabled nil)
|
2012-09-02 11:34:56 +02:00
|
|
|
(put 'scroll-left 'disabled nil)
|
2012-08-26 21:50:26 +02:00
|
|
|
|
|
|
|
(setq-default bidi-paragraph-direction 'left-to-right)
|
2012-08-18 13:57:56 +02:00
|
|
|
(setq-default c-basic-offset 4)
|
|
|
|
(setq-default fci-rule-column 73)
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq-default gac-automatically-push-p t)
|
|
|
|
(setq-default indent-tabs-mode nil)
|
|
|
|
(setq-default php-mode-warn-if-mumamo-off nil)
|
|
|
|
(setq-default require-final-newline t)
|
|
|
|
(setq-default tab-width 4)
|
|
|
|
(setq-default truncate-lines t)
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq appt-display-diary nil)
|
|
|
|
(setq auto-mode-case-fold nil)
|
|
|
|
(setq auto-save-file-name-transforms
|
|
|
|
`((".*" ,temporary-file-directory t)))
|
2012-08-24 10:51:47 +02:00
|
|
|
(setq avandu-article-render-function #'avandu-view-w3m)
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq backup-directory-alist
|
|
|
|
`((".*" . ,temporary-file-directory)))
|
|
|
|
(setq browse-url-browser-function 'browse-url-generic)
|
|
|
|
(setq browse-url-generic-program (getenv "BROWSER"))
|
|
|
|
(setq custom-file "~/.emacs.d/custom.el")
|
|
|
|
(setq custom-theme-directory "~/.emacs.d/themes")
|
|
|
|
(setq default-frame-alist
|
|
|
|
`((border-width . 0)
|
|
|
|
(internal-border-width . 0)
|
|
|
|
(vertical-scroll-bars . nil)
|
|
|
|
(menu-bar-lines . nil)
|
|
|
|
(tool-bar-lines . nil)
|
2012-10-11 21:23:32 +02:00
|
|
|
(font . "Monaco:pixelsize=16")
|
2012-08-26 21:50:26 +02:00
|
|
|
(left-fringe . 0)))
|
|
|
|
(setq emms-source-file-default-directory "/mnt/music/")
|
|
|
|
(setq erc-autojoin-channels-alist
|
2012-09-17 09:53:59 +02:00
|
|
|
'(("freenode.net" "#ninthfloor" "#emacs" "#dispass")))
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq erc-hide-list '("JOIN" "PART" "QUIT"))
|
|
|
|
(setq erc-insert-timestamp-function 'erc-insert-timestamp-left)
|
|
|
|
(setq erc-nick "ryuslash")
|
|
|
|
(setq erc-timestamp-format "[%H:%M] ")
|
|
|
|
(setq erc-timestamp-only-if-changed-flag nil)
|
|
|
|
(setq eshell-highlight-prompt nil)
|
|
|
|
(setq eshell-prompt-function 'oni:eshell-prompt-function)
|
|
|
|
(setq eshell-prompt-regexp "^[#$]> ")
|
2012-08-18 13:57:56 +02:00
|
|
|
(setq fci-rule-color "darkred")
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq flymake-gui-warnings-enabled nil)
|
2012-09-27 23:32:30 +02:00
|
|
|
(setq flymake-info-line-regexp
|
|
|
|
(eval-when-compile
|
2012-10-19 13:29:34 +02:00
|
|
|
(regexp-opt
|
|
|
|
'("Invalid name"
|
|
|
|
"String statement has no effect"
|
|
|
|
"Missing docstring"
|
|
|
|
"Empty docstring"
|
|
|
|
"multiple imports on one line"
|
|
|
|
"expected 2 blank lines, found 1"
|
|
|
|
"TODO:"
|
|
|
|
"whitespace after '{'"
|
|
|
|
"whitespace before '}'"
|
|
|
|
"whitespace before ':'"
|
|
|
|
"whitespace after '('"
|
|
|
|
"whitespace before ')'"
|
|
|
|
"the backslash is redundant between brackets"
|
|
|
|
"continuation line over-indented for visual indent"
|
|
|
|
"continuation line under-indented for visual indent"
|
|
|
|
"Too many statements"
|
|
|
|
"comparison to None should be"
|
|
|
|
"missing whitespace around operator"
|
|
|
|
"missing whitespace after ','"
|
|
|
|
"line too long"
|
|
|
|
"at least two spaces before inline comment"
|
|
|
|
"trailing whitespace"))))
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq flymake-log-file-name (expand-file-name "~/.emacs.d/flymake.log"))
|
|
|
|
(setq flymake-log-level 0)
|
2012-09-25 09:58:26 +02:00
|
|
|
(setq flymake-warn-line-regexp
|
|
|
|
(eval-when-compile
|
|
|
|
(regexp-opt '("warning"
|
|
|
|
"Warning"
|
2012-10-19 13:29:34 +02:00
|
|
|
"imported but unused"
|
|
|
|
"redefinition of unused"
|
|
|
|
"Redefining built-in"
|
|
|
|
"Redefining name"
|
|
|
|
"Unused argument"
|
|
|
|
"Unused variable"
|
|
|
|
"Dangerous default value {} as argument"
|
|
|
|
"no newline at end of file"
|
|
|
|
"Access to a protected member"))))
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq frame-title-format '(:eval (concat "emacs: " (buffer-name))))
|
|
|
|
(setq geiser-repl-history-filename "~/.emacs.d/geiser-history")
|
|
|
|
(setq gtags-auto-update t)
|
|
|
|
(setq help-at-pt-display-when-idle t)
|
|
|
|
(setq ido-auto-merge-delay-time 1000000)
|
2012-09-11 10:32:30 +02:00
|
|
|
(setq ido-default-buffer-method 'selected-window)
|
2012-09-07 15:21:59 +02:00
|
|
|
(setq ido-max-window-height 1)
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq ido-save-directory-list-file nil)
|
2012-09-11 21:03:50 +02:00
|
|
|
(setq ido-ubiquitous-command-exceptions '(oni:view-mail tmm-menubar))
|
2012-08-18 13:57:56 +02:00
|
|
|
(setq inferior-lisp-program "sbcl")
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq inhibit-default-init t)
|
|
|
|
(setq inhibit-local-menu-bar-menus t)
|
|
|
|
(setq inhibit-startup-message t)
|
|
|
|
(setq initial-major-mode 'emacs-lisp-mode)
|
|
|
|
(setq initial-scratch-message nil)
|
2012-10-19 13:29:34 +02:00
|
|
|
(setq jabber-account-list '(("ryuslash@jabber.org")
|
|
|
|
("tom@ryuslash.org"
|
|
|
|
(:connection-type . ssl))))
|
2012-08-18 13:57:56 +02:00
|
|
|
(setq jabber-chat-buffer-format "*jabber:%n*")
|
|
|
|
(setq jabber-chat-buffer-show-avatar nil)
|
|
|
|
(setq jabber-chat-fill-long-lines nil)
|
2012-10-11 15:46:37 +02:00
|
|
|
(setq jabber-chat-foreign-prompt-format "%t < ")
|
|
|
|
(setq jabber-chat-local-prompt-format "%t > ")
|
2012-08-18 13:57:56 +02:00
|
|
|
(setq jabber-chatstates-confirm nil)
|
|
|
|
(setq jabber-history-dir "~/.emacs.d/jabber")
|
|
|
|
(setq jabber-roster-show-bindings nil)
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq jit-lock-defer-time 0.2)
|
2012-10-17 00:38:29 +02:00
|
|
|
(setq magit-repo-dirs '("~/var/src/"))
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq message-log-max 1000)
|
|
|
|
(setq message-send-mail-function 'message-send-mail-with-sendmail)
|
2012-10-07 13:58:59 +02:00
|
|
|
(setq mode-line-position nil)
|
2012-08-18 13:57:56 +02:00
|
|
|
(setq mu4e-headers-date-format "%d-%m %H:%M")
|
|
|
|
(setq mu4e-headers-fields '((:date . 11)
|
|
|
|
(:flags . 6)
|
|
|
|
(:to . 22)
|
|
|
|
(:from . 22)
|
|
|
|
(:subject)))
|
|
|
|
(setq mu4e-headers-show-threads nil)
|
|
|
|
(setq mu4e-headers-sort-revert nil)
|
2012-08-31 09:52:16 +02:00
|
|
|
(setq mu4e-html2text-command "w3m -dump -T text/HTML -cols 72")
|
2012-08-24 10:51:47 +02:00
|
|
|
(setq mu4e-my-email-addresses (list
|
|
|
|
(oni:email tom at ryuslash dot org)
|
|
|
|
(oni:email ryuslash at gmail dot com)
|
|
|
|
(oni:email ryuslash at ninthfloor dot org)
|
|
|
|
(oni:email thomas at aethon dot nl)))
|
2012-08-18 13:57:56 +02:00
|
|
|
(setq org-agenda-custom-commands
|
2012-10-16 10:04:03 +02:00
|
|
|
'(("wt" "Work todo."
|
|
|
|
tags-todo "CATEGORY=\"Work\"")
|
|
|
|
("wm" "Myaethon2 todo."
|
|
|
|
tags-todo "CATEGORY=\"myaethon2\"")))
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq org-agenda-sorting-strategy
|
2012-08-18 13:57:56 +02:00
|
|
|
'((agenda habit-down time-up priority-down category-keep)
|
|
|
|
(todo priority-down category-up)
|
|
|
|
(tags priority-down category-keep)
|
|
|
|
(search category-keep)))
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq org-capture-templates
|
2012-09-07 15:21:59 +02:00
|
|
|
'(("t" "Task" entry (file "~/documents/org/tasks")
|
|
|
|
"* TODO %?")
|
2012-08-26 21:50:26 +02:00
|
|
|
("h" "Habit" entry (file "")
|
2012-08-18 13:57:56 +02:00
|
|
|
(concat "* TODO %^{Description}\n"
|
|
|
|
" SCHEDULED: %^T\n"
|
|
|
|
" :PROPERTIES:\n"
|
|
|
|
" :STYLE: habit\n"
|
|
|
|
" :END:")
|
|
|
|
:immediate-finish t)
|
|
|
|
("l" "Log" entry (file+headline "" "notes")
|
|
|
|
(concat "* %n %<%d-%m-%Y %H:%M:%S>\n"
|
|
|
|
" %a\n\n"
|
|
|
|
" %?")
|
|
|
|
:prepend t :empty-lines 1)
|
|
|
|
("a" "Appointment" entry (file+headline "" "appointments")
|
|
|
|
"* %^{Description} %^T" :immediate-finish t)
|
|
|
|
("b" "Bookmark" entry (file "~/documents/org/misc/bookmarks.org")
|
|
|
|
"* %c\n\n %:initial")))
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq org-contacts-files '("~/documents/org/misc/contacts.org"))
|
|
|
|
(setq org-directory (expand-file-name "~/documents/org"))
|
|
|
|
(setq org-agenda-files
|
|
|
|
`(,(concat org-directory "/org")
|
|
|
|
,(concat org-directory "/misc/contacts.org")
|
|
|
|
,(concat org-directory "/misc/bookmarks.org")))
|
|
|
|
(setq org-default-notes-file (concat org-directory "/org"))
|
|
|
|
(setq org-export-htmlize-output-type 'css)
|
|
|
|
(setq org-feed-alist
|
|
|
|
'(("MyEpisodes"
|
|
|
|
"http://www.myepisodes.com/rss.php?feed=mylist&uid=Slash&pwdmd5=04028968e1f0b7ee678b748a4320ac17"
|
2012-10-07 13:18:59 +02:00
|
|
|
"~/documents/org/tasks" "MyEpisodes"
|
2012-08-26 21:50:26 +02:00
|
|
|
:formatter oni:myepisodes-formatter)))
|
|
|
|
(setq org-hide-emphasis-markers t)
|
|
|
|
(setq org-outline-path-complete-in-steps t)
|
|
|
|
(setq org-refile-allow-creating-parent-nodes t)
|
|
|
|
(setq org-refile-targets '((nil . (:maxlevel . 6))))
|
|
|
|
(setq org-refile-use-outline-path 'file)
|
|
|
|
(setq org-return-follows-link t)
|
|
|
|
(setq org-src-fontify-natively t)
|
|
|
|
(setq org-tags-exclude-from-inheritance '("crypt"))
|
2012-08-18 13:57:56 +02:00
|
|
|
(setq org-todo-keyword-faces
|
2012-10-11 21:23:32 +02:00
|
|
|
'(("TODO" :background "red")
|
|
|
|
("DONE" :background "forest green")
|
|
|
|
("SUCCEEDED" :background "forest green")
|
|
|
|
("WAITING" :background "orange" :foreground "black")
|
|
|
|
("CANCELLED" :background "orange red")
|
|
|
|
("FAILED" :background "orange red")
|
|
|
|
("WIP" :background "#ff9800" :foreground "black")
|
|
|
|
("HOLD" :background "orange" :foreground "black")
|
|
|
|
("ACQUIRE" :background "red")
|
|
|
|
("IGNORED" :background "#555555")))
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq org-use-fast-todo-selection t)
|
|
|
|
(setq package-archives
|
|
|
|
'(("melpa" . "http://melpa.milkbox.net/packages/")
|
|
|
|
("ELPA" . "http://tromey.com/elpa/")
|
|
|
|
("gnu" . "http://elpa.gnu.org/packages/")
|
|
|
|
("marmalade" . "http://marmalade-repo.org/packages/")))
|
|
|
|
(setq package-load-list '((htmlize "1.39")
|
2012-09-14 01:55:41 +02:00
|
|
|
(lua-mode "20111107")
|
2012-10-03 02:50:02 +02:00
|
|
|
(python "0.24.2")
|
2012-08-26 21:50:26 +02:00
|
|
|
all))
|
|
|
|
(setq php-function-call-face 'font-lock-function-name-face)
|
|
|
|
(setq php-mode-force-pear t)
|
2012-09-11 23:27:45 +02:00
|
|
|
(setq pony-tpl-indent-moves t)
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq rainbow-delimiters-max-face-count 12)
|
|
|
|
(setq redisplay-dont-pause t)
|
|
|
|
(setq sauron-column-alist '((timestamp . 6)
|
|
|
|
(message)))
|
|
|
|
(setq sauron-hide-mode-line t)
|
|
|
|
(setq sauron-max-line-length 189)
|
|
|
|
(setq sauron-timestamp-format "%H:%M")
|
|
|
|
(setq sauron-watch-nicks '("ryuslash"))
|
|
|
|
(setq sauron-watch-patterns '("ryuslash"))
|
|
|
|
(setq scroll-conservatively 101)
|
|
|
|
(setq send-mail-function 'smtpmail-send-it)
|
|
|
|
(setq sendmail-program "/usr/bin/msmtp")
|
2012-09-14 01:55:41 +02:00
|
|
|
(setq smex-key-advice-ignore-menu-bar t)
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq smex-save-file "~/.emacs.d/smex-items")
|
|
|
|
(setq special-display-buffer-names '("*Sauron*"))
|
|
|
|
(setq special-display-frame-alist '((minibuffer . nil)
|
|
|
|
(right-fringe . 0)))
|
2012-09-07 15:21:59 +02:00
|
|
|
(setq split-height-threshold 40)
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq time-stamp-active t)
|
|
|
|
(setq time-stamp-format "%04y-%02m-%02d %02H:%02M:%02S (%u)")
|
|
|
|
(setq uniquify-buffer-name-style 'post-forward)
|
|
|
|
(setq use-dialog-box nil)
|
|
|
|
(setq user-full-name "Tom Willemsen")
|
|
|
|
(setq whitespace-style '(face trailing))
|
2012-09-07 15:21:59 +02:00
|
|
|
(setq window-combination-resize t)
|
2012-08-26 21:50:26 +02:00
|
|
|
(setq yas-prompt-functions '(yas-ido-prompt))
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-09-02 11:29:02 +02:00
|
|
|
(add-hook 'after-save-hook 'oni:after-save-func t)
|
2012-08-26 21:50:26 +02:00
|
|
|
(add-hook 'before-save-hook 'oni:before-save-func)
|
|
|
|
(add-hook 'c-mode-hook 'oni:c-mode-func)
|
|
|
|
(add-hook 'css-mode-hook 'oni:css-mode-func)
|
2012-08-18 13:57:56 +02:00
|
|
|
(add-hook 'diary-display-hook 'oni:diary-display-func)
|
2012-08-26 21:50:26 +02:00
|
|
|
(add-hook 'emacs-lisp-mode-hook 'oni:emacs-lisp-mode-func)
|
|
|
|
(add-hook 'erc-mode-hook 'oni:erc-mode-func)
|
|
|
|
(add-hook 'eshell-mode-hook 'oni:eshell-mode-func)
|
|
|
|
(add-hook 'flymake-mode-hook 'oni:flymake-mode-func)
|
|
|
|
(add-hook 'go-mode-hook 'oni:go-mode-func)
|
|
|
|
(add-hook 'gtags-mode-hook 'oni:gtags-mode-func)
|
|
|
|
(add-hook 'html-mode-hook 'oni:html-mode-func)
|
2012-10-17 00:38:29 +02:00
|
|
|
(add-hook 'jabber-alert-message-hooks 'oni:jabber-alert-message-func)
|
2012-08-26 21:50:26 +02:00
|
|
|
(add-hook 'jabber-chat-mode-hook 'oni:jabber-chat-mode-func)
|
2012-09-16 23:41:22 +02:00
|
|
|
(add-hook 'jabber-roster-mode-hook 'oni:jabber-roster-mode-func)
|
2012-08-26 21:50:26 +02:00
|
|
|
(add-hook 'java-mode-hook 'oni:java-mode-func)
|
|
|
|
(add-hook 'js-mode-hook 'oni:js-mode-func)
|
2012-09-11 21:03:50 +02:00
|
|
|
(add-hook 'js2-mode-hook 'oni:js2-mode-func)
|
2012-09-13 10:38:37 +02:00
|
|
|
(add-hook 'lua-mode-hook 'oni:lua-mode-func)
|
2012-08-26 21:50:26 +02:00
|
|
|
(add-hook 'magit-log-edit-mode-hook 'oni:magit-log-edit-mode-func)
|
|
|
|
(add-hook 'markdown-mode-hook 'oni:markdown-mode-func)
|
|
|
|
(add-hook 'message-mode-hook 'oni:message-mode-func)
|
|
|
|
(add-hook 'org-mode-hook 'oni:org-mode-func)
|
|
|
|
(add-hook 'php-mode-hook 'oni:php-mode-func)
|
|
|
|
(add-hook 'prog-mode-hook 'oni:prog-mode-func)
|
|
|
|
(add-hook 'python-mode-hook 'oni:python-mode-func)
|
2012-10-11 21:23:32 +02:00
|
|
|
(add-hook 'rst-mode-hook 'oni:rst-mode-func)
|
2012-08-26 21:50:26 +02:00
|
|
|
(add-hook 'term-mode-hook 'oni:term-mode-func)
|
|
|
|
(add-hook 'texinfo-mode-hook 'oni:texinfo-mode-func)
|
|
|
|
(add-hook 'write-file-hooks 'oni:write-file-func)
|
2012-08-31 09:52:16 +02:00
|
|
|
(add-hook 'yas-minor-mode-hook 'oni:yas-minor-mode-func)
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-08-26 21:50:26 +02:00
|
|
|
(global-set-key (kbd "'") 'oni:self-insert-dwim)
|
|
|
|
(global-set-key (kbd "<XF86AudioNext>") 'emms-next)
|
|
|
|
(global-set-key (kbd "<XF86AudioPlay>") 'oni:emms-toggle-playing)
|
|
|
|
(global-set-key (kbd "<XF86AudioPrev>") 'emms-previous)
|
|
|
|
(global-set-key (kbd "<XF86AudioStop>") 'emms-stop)
|
|
|
|
(global-set-key (kbd "<XF86HomePage>") 'oni:raise-scratch)
|
|
|
|
(global-set-key (kbd "<XF86Mail>") 'oni:view-mail)
|
2012-09-14 01:55:41 +02:00
|
|
|
(global-set-key (kbd "<XF86Tools>") 'oni:start-emms)
|
2012-10-17 00:38:29 +02:00
|
|
|
(global-set-key (kbd "<f10>") 'git-project-show-files)
|
2012-10-11 21:23:32 +02:00
|
|
|
(global-set-key (kbd "<f5>") 'ext:reload-buffer)
|
2012-08-26 21:50:26 +02:00
|
|
|
(global-set-key (kbd "<f6>") 'jabber-switch-to-roster-buffer)
|
|
|
|
(global-set-key (kbd "<f7>") 'magit-status)
|
|
|
|
(global-set-key (kbd "<f8>") 'oni:raise-eshell)
|
|
|
|
(global-set-key (kbd "C-<") 'indent-shift-left)
|
|
|
|
(global-set-key (kbd "C->") 'indent-shift-right)
|
2012-10-07 22:13:55 +02:00
|
|
|
(global-set-key (kbd "C-M-4") 'split-window-vertically)
|
2012-09-25 09:58:26 +02:00
|
|
|
(global-set-key (kbd "C-M-SPC") 'er/expand-region)
|
2012-08-26 21:50:26 +02:00
|
|
|
(global-set-key (kbd "C-M-d") 'kill-word)
|
|
|
|
(global-set-key (kbd "C-M-w") 'backward-kill-word)
|
|
|
|
(global-set-key (kbd "C-S-k") 'kill-whole-line)
|
|
|
|
(global-set-key (kbd "C-a") 'oni:move-beginning-of-dwim)
|
|
|
|
(global-set-key (kbd "C-c a") 'org-agenda)
|
|
|
|
(global-set-key (kbd "C-c c") 'org-capture)
|
|
|
|
(global-set-key (kbd "C-c i p") 'identica-update-status-interactive)
|
2012-10-07 22:13:55 +02:00
|
|
|
(global-set-key (kbd "C-c p") 'oni:show-buffer-position)
|
2012-10-17 09:04:54 +02:00
|
|
|
(global-set-key (kbd "C-c t") 'oni:raise-ansi-term)
|
2012-08-26 21:50:26 +02:00
|
|
|
(global-set-key (kbd "C-d") 'oni:kill-region-or-forward-char)
|
|
|
|
(global-set-key (kbd "C-e") 'oni:move-end-of-dwim)
|
|
|
|
(global-set-key (kbd "C-k") 'oni:kill-region-or-line)
|
|
|
|
(global-set-key (kbd "C-w") 'oni:kill-region-or-backward-char)
|
|
|
|
(global-set-key (kbd "C-x C-b") 'electric-buffer-list)
|
2012-10-07 22:13:55 +02:00
|
|
|
(global-set-key (kbd "M-4") 'split-window-horizontally)
|
2012-08-26 21:50:26 +02:00
|
|
|
(global-set-key (kbd "M-n") 'idomenu)
|
|
|
|
(global-set-key (kbd "\"") 'oni:self-insert-dwim)
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-09-14 09:56:35 +02:00
|
|
|
(if (daemonp)
|
|
|
|
(global-set-key "\C-x\C-c" 'oni:close-client-window)
|
2012-09-15 13:38:08 +02:00
|
|
|
(unless (server-running-p)
|
|
|
|
(server-start)))
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-08-26 21:50:26 +02:00
|
|
|
(when (or window-system (daemonp))
|
|
|
|
(global-unset-key "\C-z"))
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-08-26 21:50:26 +02:00
|
|
|
(add-to-list 'auto-mode-alist '("\\.jl$" . sawfish-mode))
|
2012-09-11 21:03:50 +02:00
|
|
|
(add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js2-mode))
|
2012-09-27 23:32:30 +02:00
|
|
|
(add-to-list 'auto-mode-alist '("\\.m\\(ark\\)?d\\(?:o?wn\\)?$" . markdown-mode))
|
2012-08-26 21:50:26 +02:00
|
|
|
(add-to-list 'auto-mode-alist '("\\.php[345]?$" . php-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.po\\'\\|\\.po\\." . po-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.tpl$" . html-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("^PKGBUILD$" . shell-script-mode))
|
2012-08-18 13:57:56 +02:00
|
|
|
(add-to-list 'auto-mode-alist '("^\\.Xmodmap$" . xmodmap-mode))
|
|
|
|
|
|
|
|
(add-to-list 'debug-ignored-errors "^Can't shift all lines enough")
|
|
|
|
|
2012-09-25 09:58:26 +02:00
|
|
|
(add-to-list 'display-buffer-alist
|
|
|
|
'(".*" . ((bw-display-in-other-window . nil))))
|
2012-09-17 20:01:41 +02:00
|
|
|
(add-to-list 'display-buffer-alist
|
|
|
|
'("^\\*.*\\*$" . ((bw-display-in-bottom-window . nil))))
|
2012-10-10 09:10:18 +02:00
|
|
|
(add-to-list 'display-buffer-alist
|
|
|
|
'("^\\*magit: .*\\*$" . ((display-buffer-same-window . nil))))
|
2012-10-17 00:38:29 +02:00
|
|
|
(add-to-list 'display-buffer-alist
|
|
|
|
'("^\\*git-project-list\\*$" . ((git-project-show-window . nil))))
|
2012-09-17 20:01:41 +02:00
|
|
|
|
2012-10-07 13:58:59 +02:00
|
|
|
(delete " " mode-line-format)
|
|
|
|
|
2012-08-26 21:50:26 +02:00
|
|
|
(unless (oni:required-packages-installed-p)
|
|
|
|
(message "%s" "Refreshing package database...")
|
|
|
|
(package-refresh-contents)
|
|
|
|
(message "%s" " done.")
|
|
|
|
(mapc #'(lambda (package)
|
|
|
|
(when (not (package-installed-p package))
|
|
|
|
(package-install package)))
|
|
|
|
oni:required-packages))
|
2012-08-18 13:57:56 +02:00
|
|
|
|
|
|
|
(blink-cursor-mode -1)
|
|
|
|
(menu-bar-mode -1)
|
|
|
|
(scroll-bar-mode -1)
|
|
|
|
(tool-bar-mode -1)
|
|
|
|
(tooltip-mode -1)
|
2012-10-07 13:58:59 +02:00
|
|
|
(line-number-mode -1)
|
|
|
|
(column-number-mode -1)
|
2012-08-18 13:57:56 +02:00
|
|
|
|
2012-09-25 09:58:26 +02:00
|
|
|
(auto-insert-mode)
|
2012-08-26 21:50:26 +02:00
|
|
|
(electric-indent-mode)
|
|
|
|
(electric-pair-mode)
|
2012-08-18 13:57:56 +02:00
|
|
|
(ido-mode)
|
2012-09-11 23:27:45 +02:00
|
|
|
(ido-ubiquitous-mode)
|
2012-08-26 21:50:26 +02:00
|
|
|
(savehist-mode)
|
|
|
|
(show-paren-mode)
|
2012-08-18 13:57:56 +02:00
|
|
|
|
|
|
|
(smex-initialize)
|
|
|
|
(help-at-pt-set-timer)
|
|
|
|
|
2012-10-19 13:33:21 +02:00
|
|
|
(load-theme 'yoshi t)
|
2012-08-18 13:57:56 +02:00
|
|
|
|
|
|
|
(load custom-file)
|
|
|
|
(load "rudel-loaddefs.el")
|
|
|
|
(load (expand-file-name "~/quicklisp/slime-helper.el"))
|
2012-09-07 15:21:59 +02:00
|
|
|
|
2012-09-25 10:01:33 +02:00
|
|
|
(load "quick-edit-mode")
|
|
|
|
(global-set-key (kbd "C-z") 'quick-edit-mode)
|
|
|
|
|
2012-09-07 15:21:59 +02:00
|
|
|
(provide 'init)
|
|
|
|
|
|
|
|
;;; init.el ends here
|