diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-08-06 13:04:54 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-08-06 13:04:54 +0200 |
commit | f832ad6a57406a44dc11a683bcf9369a0587cb4a (patch) | |
tree | e733ca7566e26ed7815c32411ae611a55778e3bc /lisp | |
parent | 486d71724752537f89e6e598231a863012c73c4e (diff) |
re-write mastodon-switch-to-buffer
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon.el | 10 |
1 files changed, 4 insertions, 6 deletions
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 () |