summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-12-18 20:29:53 +0100
committerGravatar Tom Willemse2015-12-18 20:33:37 +0100
commitc75739c4065de8a12fa307fe895bed7ef44417d3 (patch)
treea4877a91b1dfad328a6a5f1d8bda077a513ea397 /emacs/.emacs.d/init.el
parentaff5b835541f08a9edfa4fc8e914337d9a43b436 (diff)
downloaddotfiles-c75739c4065de8a12fa307fe895bed7ef44417d3.tar.gz
dotfiles-c75739c4065de8a12fa307fe895bed7ef44417d3.zip
Add jabber library
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r--emacs/.emacs.d/init.el23
1 files changed, 8 insertions, 15 deletions
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)