From c75739c4065de8a12fa307fe895bed7ef44417d3 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 18 Dec 2015 20:29:53 +0100 Subject: Add jabber library --- emacs/.emacs.d/init.el | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'emacs/.emacs.d/init.el') diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 258acb1..bf1088c 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -141,10 +141,6 @@ MODE1 is enabled and vice-versa." "Set the `disabled' property for each item in FUNCTIONS to nil." (mapc #'(lambda (f) (put f 'disabled nil)) functions)) -(defun oni:set-keys-for-jabber-chat () - "Set certain keys for `jabber-chat-mode'." - (local-set-key (kbd "M-!") #'shell-command-with-command)) - (defun oni:set-keys-for-tagedit () "Set some keybindings for `tagedit-mode'." (local-set-key (kbd "M-k") #'tagedit-kill-attribute)) @@ -205,14 +201,6 @@ For `python-mode' I prefer `python-imenu-create-flat-index'." (oni:set-theme frame)))) (oni:eval-after-init (oni:set-theme nil))) -(defun oni:shell-command-with-command (command &optional output-buffer) - "Print both COMMAND and the output into OUTPUT-BUFFER." - (interactive (list (read-shell-command "Shell command: " nil nil) - current-prefix-arg)) - (when output-buffer - (insert "`" command "':\n")) - (shell-command command output-buffer)) - (defun oni:show-buffer-position () "Show the position in the current buffer." (interactive) @@ -761,9 +749,14 @@ If no direction is given, don't split." (oni:add-hooks 'ielm-mode-hook #'paredit-mode #'eldoc-mode 'oni:set-emacs-lisp-keys) -(oni:add-hooks 'jabber-chat-mode-hook - #'oni:set-keys-for-jabber-chat 'oni:make-readable - 'oni:reset-default-directory) +;; Bind Jabber chat-specific keys +(add-hook 'jabber-chat-mode-hook 'oni:set-keys-for-jabber-chat) + +;; Make jabber chat buffers a little bit more readable +(add-hook 'jabber-chat-mode-hook 'oni:make-readable) + +;; Reset the `default-directory' to my $HOME in jabber chat buffers. +(add-hook 'jabber-chat-mode-hook 'oni:reset-default-directory) (oni:add-hooks 'js2-mode-hook #'tern-mode #'moz-minor-mode) -- cgit v1.2.3-54-g00ecf