From f832ad6a57406a44dc11a683bcf9369a0587cb4a Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 6 Aug 2024 13:04:54 +0200 Subject: re-write mastodon-switch-to-buffer --- lisp/mastodon.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 23168b2..7ac980c 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -454,12 +454,10 @@ Calls `mastodon-tl--get-buffer-type', which see." (defun mastodon-switch-to-buffer () "Switch to a live mastodon buffer." (interactive) - (let ((choice (read-buffer - "Switch to mastodon buffer: " nil t - (lambda (cand) - (with-current-buffer - (if (stringp cand) cand (car cand)) - (mastodon-tl--get-buffer-type)))))) + (let ((choice (completing-read + "Switch to mastodon buffer: " + (mapcar #'buffer-name (mastodon-live-buffers)) + nil :match))) (switch-to-buffer choice))) (defun mastodon--url-at-point () -- cgit v1.2.3