diff options
author | jao <jao@gnu.org> | 2021-05-13 22:26:45 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-05-13 22:26:45 +0100 |
commit | 74219ab7d937926d3430e8d479c786c9a558cef1 (patch) | |
tree | 9513863ee10db04c0675f24aea552a99da3e6fcb | |
parent | 7b916ebaa7b7eab5624eb6274073d4dda4d0aba8 (diff) | |
download | elibs-74219ab7d937926d3430e8d479c786c9a558cef1.tar.gz elibs-74219ab7d937926d3430e8d479c786c9a558cef1.tar.bz2 |
jao-minibuffer ad-hoc notifications gone
-rw-r--r-- | lib/eos/jao-ednc.el | 12 | ||||
-rw-r--r-- | lib/eos/jao-minibuffer.el | 25 |
2 files changed, 3 insertions, 34 deletions
diff --git a/lib/eos/jao-ednc.el b/lib/eos/jao-ednc.el index 71f1ce4..0c52286 100644 --- a/lib/eos/jao-ednc.el +++ b/lib/eos/jao-ednc.el @@ -35,7 +35,6 @@ (defvar jao-ednc--notifications ()) (defvar jao-ednc--handlers ()) -(defvar jao-ednc-use-minibuffer-notifications nil) (defvar jao-ednc-use-tracking nil) (defface jao-ednc-tracking '((t :inherit warning)) @@ -61,22 +60,15 @@ (defun jao-ednc-ignore-app (app) (jao-ednc-add-handler app (lambda (not _) (ednc-dismiss-notification not)))) -(defun jao-ednc--pop-minibuffer () - (if jao-ednc-use-minibuffer-notifications - (jao-minibuffer-pop-notification) - (jao-minibuffer-refresh))) - (defun jao-ednc--clean (&optional notification) (tracking-remove-buffer (get-buffer ednc-log-name)) (if notification (remove notification jao-ednc--notifications) (pop jao-ednc--notifications)) - (jao-ednc--pop-minibuffer)) + (jao-minibuffer-refresh)) (defun jao-ednc--show-last () - (if jao-ednc-use-minibuffer-notifications - (jao-minibuffer-push-notification '(:eval (jao-ednc--format-last))) - (message "%s" (jao-ednc--format-last)))) + (jao-minibuffer-push-notification '(:eval (jao-ednc--format-last)))) (defun jao-ednc--default-handler (notification newp) (if (not newp) diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el index c88e591..2dae445 100644 --- a/lib/eos/jao-minibuffer.el +++ b/lib/eos/jao-minibuffer.el @@ -149,33 +149,10 @@ :background jao-minibuffer-active-buffer-line-color) (set-face-attribute 'mode-line-inactive nil :box nil :height 1 :background jao-minibuffer-inactive-buffer-line-color) - (advice-add 'force-mode-line-update :after #'jao-minibuffer-refresh) + ;; (advice-add 'force-mode-line-update :after #'jao-minibuffer-refresh) (add-hook 'buffer-list-update-hook #'jao-minibuffer-refresh) (jao-minibuffer-add-variable 'jao-minibuffer--mode-line-format order)) -(defvar jao-minibuffer--notification-timer nil) - -(defun jao-minibuffer--start-notification-timer (timeout) - (interactive) - (when jao-minibuffer--notification-timer - (cancel-timer jao-minibuffer--notification-timer)) - (setq jao-minibuffer--notification-timer - (run-with-idle-timer (or timeout jao-minibuffer-notification-timeout) - nil - 'jao-minibuffer-pop-notification))) - -;;;###autoload -(defun jao-minibuffer-push-notification (msg &optional timeout) - (setq jao-minibuffer-notification msg) - (jao-minibuffer--start-notification-timer timeout) - (jao-minibuffer-refresh)) - -;;;###autoload -(defun jao-minibuffer-pop-notification () - (interactive) - (setq jao-minibuffer-notification nil) - (jao-minibuffer-refresh)) - ;;;###autoload (defun jao-minibuffer-toggle () (interactive) |