From 6d0999e20907345314d8fe8e1c42eb87a7f5ae63 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 14 Aug 2013 21:28:02 +0200 Subject: Move jabber config to separate file --- .emacs.d/init.el | 74 +++----------------------------------------------------- 1 file changed, 3 insertions(+), 71 deletions(-) (limited to '.emacs.d/init.el') diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b81c6cb..65f9632 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -101,22 +101,6 @@ FEATURE may be an unquoted feature symbol or a file name, see (mark-defun) (indent-region (region-beginning) (region-end)))) -(defun init-make-readable () - "Make the current buffer more readable." - (setq line-spacing .2)) - -(defun init-show-status-in-buffer (who oldstatus newstatus statustext - proposed-alert) - "Check to see if WHO has a buffer and if so print his new status. - -OLDSTATUS, NEWSTATUS and STATUSTEXT are ignored. - -Insert PROPOSED-ALERT in the buffer if it is non-nil." - (let ((buffer (get-buffer (jabber-chat-get-buffer who)))) - (when (and buffer proposed-alert) - (with-current-buffer buffer - (insert proposed-alert "\n"))))) - (eval-and-compile (defun level (lst) (let ((lsts (mapcar (lambda (l) (if (listp l) l (list l))) lst))) @@ -419,45 +403,7 @@ Also change directories to current working directory." (stante-after imenu (setq imenu-auto-rescan t)) -(stante-after jabber - (remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo) - (setq jabber-account-list - `((,(concat "tom@ryuslash.org/" (hostname))) - (,(concat "ryuslash@ninthfloor.org/" (hostname)))))) - -(stante-after jabber-avatar - (setq jabber-avatar-cache-directory "~/.emacs.d/jabber-avatars/")) - -(stante-after jabber-chat - (setq jabber-chat-buffer-format "+%n") - (setq jabber-chat-foreign-prompt-format "%t %u/%r <\n") - (setq jabber-chat-local-prompt-format "%t %u/%r >\n") - (setq jabber-chat-buffer-show-avatar nil)) - -(stante-after jabber-chatstates - (setq jabber-chatstates-confirm nil)) - -(stante-after jabber-muc-nick-coloring - (setq jabber-muc-colorize-local t) - (setq jabber-muc-colorize-foreign t)) - -(stante-after jabber-history - (setq jabber-history-enabled t) - (setq jabber-use-global-history nil) - (setq jabber-history-dir "~/.emacs.d/jabber-hist")) - -(stante-after jabber-muc - (setq jabber-groupchat-buffer-format "++%n") - (setq jabber-groupchat-prompt-format "%t %u --\n") - (setq jabber-muc-autojoin '("aethon@muc.ryuslash.org"))) - -(stante-after jabber-roster - (setq jabber-roster-show-bindings nil) - (setq jabber-show-offline-contacts nil)) - -(stante-after jabber-vcard-avatars - (setq jabber-vcard-avatars-publish nil) - (setq jabber-vcard-avatars-retrieve nil)) +(stante-after jabber (load "jabber-init")) (stante-after jedi (setcar jedi:server-command "python2") @@ -583,11 +529,10 @@ Also change directories to current working directory." ((html) turn-off-flyspell) ((html) turn-off-auto-fill) ((hy) paredit-mode) - ((jabber-chat) visual-line-mode) ((js2 python) smartparens-mode) ((markdown python) whitespace-mode) ((message org gnus-summary gnus-article gnus-group magit-log-edit Info - info org-agenda) + info org-agenda jabber-chat) init-make-readable) ((prog) rainbow-delimiters-mode) ((python) jedi:setup) @@ -602,9 +547,6 @@ Also change directories to current working directory." (add-hook 'emacs-startup-hook 'pretty-control-l-mode) (add-hook 'after-make-frame-functions '(lambda (arg) (pretty-control-l-mode))) -(add-hook 'jabber-alert-message-hooks 'jabber-message-libnotify) -(add-hook 'jabber-alert-muc-hooks 'jabber-muc-libnotify) -(add-hook 'jabber-alert-presence-hooks #'init-show-status-in-buffer) (setq-default bidi-paragraph-direction 'left-to-right) (setq-default tab-width 4) @@ -664,7 +606,6 @@ Also change directories to current working directory." (add-hook 'go-mode-hook 'oni:go-mode-func) (add-hook 'gtags-mode-hook 'oni:gtags-mode-func) (add-hook 'haskell-mode-hook 'oni:haskell-mode-func) -(add-hook 'jabber-roster-mode-hook 'oni:jabber-roster-mode-func) (add-hook 'java-mode-hook 'oni:java-mode-func) (add-hook 'js-mode-hook 'oni:js-mode-func) (add-hook 'js2-mode-hook 'oni:js2-mode-func) @@ -682,7 +623,6 @@ Also change directories to current working directory." (global-set-key (kbd "") 'gnus) (global-set-key (kbd "") 'git-project-show-files) (global-set-key (kbd "") 'reload-buffer) -(global-set-key (kbd "") 'jabber-switch-to-roster-buffer) (global-set-key (kbd "") 'magit-status) (global-set-key (kbd "") 'raise-eshell) (global-set-key (kbd "") 'oni:show-org-index) @@ -900,15 +840,6 @@ If COUNT has been specified indent by that much, otherwise look at (setq count tab-width)) (indent-rigidly start end count))) -(defun oni:jabber-alert-message-func (from buffer text title) - (notifications-notify :title title - :body text)) - -(defun oni:jabber-roster-mode-func () - "Function for `jabber-roster-mode-hook'." - (setq mode-line-format - (list (propertize " %m" 'face 'mode-line-buffer-id)))) - (defun oni:java-mode-func () "Function for `java-mode-hook'." (local-set-key "\C-j" 'oni:newline-and-indent)) @@ -1198,4 +1129,5 @@ If no direction is given, don't split." (define-key yas-minor-mode-map [(tab)] nil) (define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand)) +(provide 'init) ;;; init.el ends here -- cgit v1.2.3-54-g00ecf