summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-04-10 23:30:58 -0400
committerKyle Meyer <kyle@kyleam.com>2017-04-10 23:30:58 -0400
commitef72f72055a21c81587ddf0d17ab5a0dccdef9b2 (patch)
treef6680cacf45bb5fc09f25d4b3084c82dfaea1219
parentbdd35ad4df4f4dc5f1a30c6556781c97bb4a0ecb (diff)
downloademacs.d-ef72f72055a21c81587ddf0d17ab5a0dccdef9b2.tar.gz
lispy: Toggle off/on with view-mode on/off
-rw-r--r--init.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/init.el b/init.el
index 4453e96..fa20541 100644
--- a/init.el
+++ b/init.el
@@ -1880,7 +1880,13 @@
;; `imenu-create-index-function' from being set to
;; `semantic-create-imenu-index'. Trying to set it in
;; `emacs-lisp-mode-hook' or `lispy-mode-hook' doesn't work.
- (defalias 'semantic-create-imenu-index 'imenu-default-create-index-function))
+ (defalias 'semantic-create-imenu-index 'imenu-default-create-index-function)
+
+ (after 'view
+ (add-hook 'view-mode-hook
+ (lambda ()
+ (when (derived-mode-p 'emacs-lisp-mode 'scheme-mode)
+ (funcall #'lispy-mode (if view-mode -1 1)))))))
(use-package geiser
:config