summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/init.el b/init.el
index 1b545e5..8d1ba17 100644
--- a/init.el
+++ b/init.el
@@ -671,6 +671,15 @@
:init
(define-key ctl-x-4-map "v" #'view-file-other-window)
:config
+ (add-hook 'view-mode-hook
+ (lambda ()
+ (when (and view-mode (bound-and-true-p lispy-mode))
+ (lispy-mode -1)
+ (add-hook 'view-mode-hook
+ (lambda ()
+ (unless view-mode (lispy-mode 1)))
+ nil 'local))))
+
(bind-keys :map view-mode-map
("l" . recenter-top-bottom)
("f" . forward-word)
@@ -1904,13 +1913,7 @@
;; `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)
-
- (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)))))))
+ (defalias 'semantic-create-imenu-index 'imenu-default-create-index-function))
(use-package geiser
:config