summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-11-23 18:10:10 +0000
committerjao <jao@gnu.org>2022-11-23 18:10:10 +0000
commitea385175fc5a5ea27499a81fe832a3a3fc6c01a3 (patch)
tree34cce124c076c806a8997cb88e796aab57958e6a
parent8eae366426f37f158711b80433ae2135510deb62 (diff)
downloadelibs-ea385175fc5a5ea27499a81fe832a3a3fc6c01a3.tar.gz
elibs-ea385175fc5a5ea27499a81fe832a3a3fc6c01a3.tar.bz2
link-hint tweaks (no messages)
-rw-r--r--custom/jao-custom-completion.el22
-rw-r--r--custom/jao-custom-notmuch.el20
2 files changed, 21 insertions, 21 deletions
diff --git a/custom/jao-custom-completion.el b/custom/jao-custom-completion.el
index d4a0a9a..51522a7 100644
--- a/custom/jao-custom-completion.el
+++ b/custom/jao-custom-completion.el
@@ -376,7 +376,8 @@
;;; link-hint
(use-package link-hint
:ensure t
- :init (setq link-hint-avy-style 'pre)
+ :init (setq link-hint-avy-style 'pre
+ link-hint-message nil)
:config
(defun jao-link-hint-open-link-ext ()
@@ -389,5 +390,24 @@
("C-S-l" . jao-link-hint-open-link-ext)
("C-x C-l" . recenter-top-bottom)))
+(with-eval-after-load "notmuch"
+ (defun jao-link-hint--notmuch-next-part (&optional bound)
+ (when-let (p (next-single-property-change (point) :notmuch-part nil bound))
+ (and (< p (or bound (point-max))) p)))
+
+ (defun jao-link-hint--notmuch-part-p ()
+ (and (get-text-property (point) :notmuch-part)
+ (when-let (b (button-at (point))) (button-label b))))
+
+ (link-hint-define-type 'notmuch-part
+ :next #'jao-link-hint--notmuch-next-part
+ :at-point-p #'jao-link-hint--notmuch-part-p
+ :vars '(notmuch-show-mode)
+ :open #'push-button
+ :open-message "Toggled"
+ :open-multiple t)
+
+ (push 'link-hint-notmuch-part link-hint-types))
+
;;; .
(provide 'jao-custom-completion)
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el
index 1ee851b..ad1bcf9 100644
--- a/custom/jao-custom-notmuch.el
+++ b/custom/jao-custom-notmuch.el
@@ -651,25 +651,5 @@
(add-to-list 'consult-recoll-open-fns
'("message/rfc822" . jao-notmuch-open-file))))
-;;; link hint
-(with-eval-after-load "link-hint"
- (defun jao-link-hint--notmuch-next-part (&optional bound)
- (when-let (p (next-single-property-change (point) :notmuch-part nil bound))
- (and (< p (or bound (point-max))) p)))
-
- (defun jao-link-hint--notmuch-part-p ()
- (and (get-text-property (point) :notmuch-part)
- (when-let (b (button-at (point))) (button-label b))))
-
- (link-hint-define-type 'notmuch-part
- :next #'jao-link-hint--notmuch-next-part
- :at-point-p #'jao-link-hint--notmuch-part-p
- :vars '(notmuch-show-mode)
- :open #'push-button
- :open-message "Toggled"
- :open-multiple t)
-
- (push 'link-hint-notmuch-part link-hint-types))
-
;;; .
(provide 'jao-custom-notmuch)