From 347008024ac3c671570309e4379a1079271124e5 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 17 Dec 2021 18:30:41 -0600 Subject: Advise vertico --- lisp/+vertico.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lisp/+vertico.el (limited to 'lisp/+vertico.el') diff --git a/lisp/+vertico.el b/lisp/+vertico.el new file mode 100644 index 0000000..4adde3d --- /dev/null +++ b/lisp/+vertico.el @@ -0,0 +1,16 @@ +;;; +vertico.el -*- lexical-binding: t; -*- + +;;; Code: + +;; https://old.reddit.com/r/emacs/comments/rbmfwk/weekly_tips_tricks_c_thread/hof7rz7/ +;; Add this advice to `vertico-next'. +;; Takes care of `vertico-previous' as well, since it calls `vertico-next'. +(defun +vertico-ding-wrap (origin &rest args) + "ADVICE to wrap `vertico-next': ding when wrapping." + (let ((beg-index vertico--index)) + (apply origin args) + (unless (eq 1 (abs (- beg-index vertico--index))) + (ding)))) + +(provide '+vertico) +;;; +vertico.el ends here -- cgit 1.4.1-21-gabe81