summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r--emacs/.emacs.d/init.el18
1 files changed, 4 insertions, 14 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 82e9305..cccc321 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -141,19 +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-tab-maybe-toggle-outline ()
- "Wrap the current function mapped to `TAB'."
- (let ((func (or (lookup-key (current-local-map) (kbd "TAB"))
- (lookup-key (current-global-map) (kbd "TAB")))))
- (local-set-key (kbd "TAB")
- (lambda ()
- (interactive)
- (if (outline-on-heading-p)
- (if (outline-invisible-p (line-end-position))
- (outline-show-entry)
- (outline-hide-entry))
- (call-interactively func))))))
-
(defun oni:current-conkeror-tab (httpcon)
"Demonstration function"
(elnode-http-start
@@ -641,7 +628,10 @@ If no direction is given, don't split."
(add-hook 'gnus-exit-group-hook 'oni:update-mailcount)
(add-hook 'gnus-exit-gnus-hook 'oni:update-mailcount)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
-(add-hook 'outline-minor-mode-hook #'oni:set-tab-maybe-toggle-outline)
+
+;; Make tab toggle outlines on outline headings.
+(add-hook 'outline-minor-mode-hook 'oni:set-tab-maybe-toggle-outline)
+
(add-hook 'scheme-mode-hook (lambda () (setq ac-sources '(ac-source-geiser))))
(add-hook 'slime-mode-hook #'set-up-slime-ac)