aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/hcel-outline.el1
-rw-r--r--lisp/hcel-source.el20
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/hcel-outline.el b/lisp/hcel-outline.el
index b90a464..b5ad54a 100644
--- a/lisp/hcel-outline.el
+++ b/lisp/hcel-outline.el
@@ -184,6 +184,7 @@ update in the outline mode too."
(define-minor-mode hcel-outline-follow-mode
"Display modules and identifiers as point moves."
+ :lighter " hcel-outline-follow"
:after-hook
(if hcel-outline-follow-mode
(if (not (eq major-mode 'hcel-outline-mode))
diff --git a/lisp/hcel-source.el b/lisp/hcel-source.el
index 783436b..b52393e 100644
--- a/lisp/hcel-source.el
+++ b/lisp/hcel-source.el
@@ -208,12 +208,16 @@ May cause error if the identifier has exact location."
(hcel-type-at-point)))
(funcall cb docstring
:thing symbol
- :face 'font-lock-variable-name-face)))
+ :face 'font-lock-variable-name-face)
+ (with-current-buffer eldoc--doc-buffer
+ (hcel-minor-mode))))
(defun hcel-eldoc-docs (cb)
(when-let ((docstring (hcel-id-docs-at-point)))
(setq this-command nil)
- (funcall cb docstring)))
+ (funcall cb docstring)
+ (with-current-buffer eldoc--doc-buffer
+ (hcel-minor-mode))))
(defun hcel-eldoc-expression-type (cb)
(when mark-active
@@ -223,7 +227,9 @@ May cause error if the identifier has exact location."
(setq this-command nil)
(funcall cb (cdr expr-and-type)
:thing (car expr-and-type)
- :face 'font-lock-variable-name-face))))
+ :face 'font-lock-variable-name-face)
+ (with-current-buffer eldoc--doc-buffer
+ (hcel-minor-mode)))))
;; highlight
(defface hcel-highlight-id '((t (:inherit underline)))
@@ -367,7 +373,7 @@ May cause error if the identifier has exact location."
;; hcel-minor mode
(defvar hcel-minor-major-modes
- '(hcel-outline-mode hcel-ids-mode eldoc-mode)
+ '(hcel-outline-mode hcel-ids-mode)
"Major modes where hcel-minor mode can live in.")
(defvar hcel-minor-mode-map
@@ -377,10 +383,12 @@ May cause error if the identifier has exact location."
(define-minor-mode hcel-minor-mode
"A minor mode for exploring haskell codebases."
+ :lighter " hcel-minor"
:after-hook
(if hcel-minor-mode
- (if (not (memq major-mode hcel-minor-major-modes))
- (error "Not in one of the following modes: %s"
+ (if (and (not (memq major-mode hcel-minor-major-modes))
+ (not (eq (current-buffer) eldoc--doc-buffer)))
+ (error "Not in one of the supported modes (%s) or the eldoc buffer."
(string-join (mapcar 'prin1-to-string hcel-minor-major-modes)
", ")))))