aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-discover.el
diff options
context:
space:
mode:
authorBjörn Bidar <bjorn.bidar@thaodan.de>2023-10-05 21:24:08 +0300
committermarty hiatt <martianhiatus@riseup.net>2023-12-31 10:59:18 +0100
commit20b41bfa9512cc643c23b8e3d8062c8bebf0be79 (patch)
tree1586b2dab05f3c61983c7c3c703f611fdcd8bea2 /lisp/mastodon-discover.el
parent3437dbbeeaa340e85ad1f2e9108469761c3e1aa6 (diff)
Avoid error when there's only one window in a frame when closing window
Use `(quit-window 'kill)` instead of `(kill-buffer-and-window)` to avoid error when there's only one window instead the frame: `kill-buffer-and-window: Attempt to delete minibuffer or sole ordinary window` Signed-off-by: Björn Bidar <bjorn.bidar@thaodan.de>
Diffstat (limited to 'lisp/mastodon-discover.el')
-rw-r--r--lisp/mastodon-discover.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/mastodon-discover.el b/lisp/mastodon-discover.el
index 5548b29..715954f 100644
--- a/lisp/mastodon-discover.el
+++ b/lisp/mastodon-discover.el
@@ -35,6 +35,8 @@
(declare-function discover-add-context-menu "discover")
+(autoload 'mastodon-kill-window "mastodon")
+
(defun mastodon-discover ()
"Plug Mastodon functionality into `discover'."
(interactive)
@@ -115,7 +117,7 @@
("C-c C-c" "Cycle profile views" mastodon-profile--account-view-cycle))
("Quit"
("q" "Quit mastodon and bury buffer." kill-this-buffer)
- ("Q" "Quit mastodon buffer and kill window." kill-buffer-and-window)
+ ("Q" "Quit mastodon buffer and kill window." mastodon--kill-window)
("M-C-q" "Quit mastodon and kill all buffers." mastodon-kill-all-buffers)))))))
(provide 'mastodon-discover)