From f82eb0bc8504ad39184e711849e7bd951b50cf77 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 12 Apr 2024 20:16:28 +0100 Subject: ednc nits --- lib/eos/jao-ednc.el | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'lib/eos') diff --git a/lib/eos/jao-ednc.el b/lib/eos/jao-ednc.el index ccd098e..92ee21f 100644 --- a/lib/eos/jao-ednc.el +++ b/lib/eos/jao-ednc.el @@ -91,7 +91,6 @@ (when old (funcall (jao-ednc--handler old) old nil)) (when new (funcall (jao-ednc--handler new) new t))) -;;;###autoload (defun jao-ednc-setup (minibuffer-order) (setq jao-notify-use-messages t) (with-eval-after-load "tracking" @@ -104,19 +103,16 @@ (add-hook 'ednc-notification-presentation-functions #'jao-ednc--on-notify) (ednc-mode)) -;;;###autoload (defun jao-ednc-pop () (interactive) (pop-to-buffer-same-window ednc-log-name)) -;;;###autoload (defun jao-ednc-show () (interactive) (if (not (jao-ednc--last-notification)) (jao-ednc-pop) (jao-ednc--show-last))) -;;;###autoload (defun jao-ednc-invoke-last-action () (interactive) (if (jao-ednc--last-notification) @@ -124,18 +120,20 @@ (message "No active notifications")) (jao-ednc--clean)) -;;;###autoload (defun jao-ednc-dismiss () + (interactive) + (when (jao-ednc--last-notification) + (ignore-errors + (with-current-buffer ednc-log-name + (ednc-dismiss-notification (jao-ednc--last-notification))))) + (jao-ednc--clean)) + +(defun jao-ednc-dismiss-and-show () (interactive) (let ((m (jao-ednc--format-last))) - (when (jao-ednc--last-notification) - (ignore-errors - (with-current-buffer ednc-log-name - (ednc-dismiss-notification (jao-ednc--last-notification))))) - (jao-ednc--clean) + (jao-ednc-dismiss) (when m (message m)))) -;;;###autoload (defun jao-ednc-dismiss-all () (interactive) (while (jao-ednc--last-notification) -- cgit v1.2.3