summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2023-01-17 01:31:31 +0000
committerjao <jao@gnu.org>2023-01-17 01:33:45 +0000
commitf1c90bc2ffd0743c69136ed770da00b493ea99f6 (patch)
treebbd8e921f0424fb827aa40f120372acbd676b588
parent76cff12402fa584f21735b265cdb145b9d376dd9 (diff)
downloadelibs-f1c90bc2ffd0743c69136ed770da00b493ea99f6.tar.gz
elibs-f1c90bc2ffd0743c69136ed770da00b493ea99f6.tar.bz2
better activation of symbol-overlay commands
-rw-r--r--init.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/init.el b/init.el
index c5492c8..0ef8d31 100644
--- a/init.el
+++ b/init.el
@@ -1903,9 +1903,20 @@
(defun jao-symbol-reveal (&rest _)
(when outline-minor-mode (outline-show-entry)))
(advice-add 'symbol-overlay-basic-jump :after 'jao-symbol-reveal)
+
+ (defun jao-symbol-put-and-next ()
+ (interactive)
+ (symbol-overlay-put)
+ (symbol-overlay-jump-next))
+
+ (defun jao-symbol-put-and-prev ()
+ (interactive)
+ (symbol-overlay-put)
+ (symbol-overlay-jump-prev))
+
:bind (:map prog-mode-map (("M-i" . symbol-overlay-put)
- ("M-n" . symbol-overlay-switch-forward)
- ("M-p" . symbol-overlay-switch-backward)))
+ ("M-n" . jao-symbol-put-and-next)
+ ("M-p" . jao-symbol-put-and-prev)))
:hook (prog-mode . symbol-overlay-mode)
:diminish " ^")