Fix behavior of delete, deleting things

This commit is contained in:
MitchMarq42 2023-08-12 13:46:48 -08:00
parent 74d7430976
commit 43d8196507

View File

@ -135,11 +135,16 @@ If STACKDEPTH is non-nil and nonzero, return a position that far down."
"Delete the notibox FRAME. "Delete the notibox FRAME.
If FRAME is the root Emacs window, or some other symbol, hide all notiboxes." If FRAME is the root Emacs window, or some other symbol, hide all notiboxes."
(if (and (framep frame) (not (frame-parent frame))) (let ((frame (notibox--resolve-frame frame)))
(delete-frame frame) (if frame
(notibox--hide (car notibox-current-posframes))) (notibox--hide frame)
(notibox--hide (car notibox-current-posframes))
)))
(pop notibox-current-posframes)) (pop notibox-current-posframes))
;; (frame-parent (selected-frame)) ;=> nil ;; (frame-parent (selected-frame)) ;=> nil
;; (frame-live-p (car notibox-current-posframes))
;; (notibox-delete (car notibox-current-posframes))
(defun notibox--tail-echoarea () (defun notibox--tail-echoarea ()
"Show `current-message' in the notibox. If that does not exist, probably hide it." "Show `current-message' in the notibox. If that does not exist, probably hide it."
@ -163,7 +168,7 @@ If FRAME is the root Emacs window, or some other symbol, hide all notiboxes."
"Show a sample notibox to prove we can." "Show a sample notibox to prove we can."
(interactive) (interactive)
(notibox-alert '(:title "five" :message "six"))) (notibox-alert '(:title "five" :message "six")))
;; (notibox-alert '(:title "一" :message "二" :timeout nil :depth 1)) ;; (notibox-alert '(:title "一" :message "二" :timeout 5 :depth 0))
(provide 'notibox) (provide 'notibox)
;;; notibox.el ends here ;;; notibox.el ends here