Cleanup also of prev commit

This commit is contained in:
MitchMarq42 2023-08-11 19:39:28 -08:00
parent 1dac237aac
commit 2d89cc3099

View File

@ -108,9 +108,11 @@ If STACKDEPTH is non-nil and nonzero, return a position that far down."
"Show a notibox corresponding with INFO. Can* be used as a backend for `alert'."
(let* ((message (plist-get info :message))
(title (plist-get info :title))
(timeout (plist-get info :persistent)))
(timeout (plist-get info :persistent))
(depth (plist-get info :depth)))
(notibox--prepare-buffer title message)
(notibox--show (unless timeout alert-fade-time))))
(notibox--show :timeout (unless timeout alert-fade-time)
:depth (or depth (- (length notibox-current-posframes) 1)))))
(defun notibox--hide (frame)
"Stop showing FRAME."
@ -140,11 +142,12 @@ If FRAME is the root Emacs window, or some other symbol, hide all notiboxes."
(interactive)
(run-with-timer notibox--refresh-delay notibox--refresh-delay #'notibox--tail-echoarea))
;; (notibox--hide 'anything)
;; (notibox-delete 'anything)
(defun notibox-test-alert ()
"Show a sample notibox to prove we can."
(interactive)
(notibox-alert '(:title "five" :message "six")))
;; (notibox-alert '(:title "一" :message "二" :timeout nil :depth 1))
(provide 'notibox)
;;; notibox.el ends here