diff options
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r-- | emacs/.emacs.d/init.el | 23 |
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) |