aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-04-24 20:46:18 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-04-24 20:46:18 +0200
commite83a88740fb04225d0136cf79b8ae5511005f301 (patch)
tree1dee4a76fc1d690ead54023ee014bd87d1b12abb /lisp
parent3ce7ee184b81b8df47f89c57d0ea2cbd6ca645bb (diff)
revert changes to auth--show-notice so that we see the message prompt
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-auth.el30
1 files changed, 18 insertions, 12 deletions
diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el
index 9f9d128..404dd57 100644
--- a/lisp/mastodon-auth.el
+++ b/lisp/mastodon-auth.el
@@ -112,18 +112,24 @@ When optional argument ASK is given which should be a string, use
ASK as the minibuffer prompt. Return whatever user types in
response to the prompt.
When ASK is absent return nil."
- (if ask
- (read-string ask)
- (let ((buffer (get-buffer-create buffer-name))
- (inhibit-read-only t))
- (set-buffer buffer)
- (erase-buffer)
- (insert notice)
- (fill-region (point-min) (point-max))
- (read-only-mode)
- (prog1 nil
- (pop-to-buffer buffer '(display-buffer-in-side-window
- (side . left) (window-width . 0.5)))))))
+ (let ((buffer (get-buffer-create buffer-name))
+ (inhibit-read-only t)
+ ask-value window)
+ (set-buffer buffer)
+ (erase-buffer)
+ (insert notice)
+ (fill-region (point-min) (point-max))
+ (read-only-mode)
+
+ (setq window (select-window
+ (split-window (frame-root-window) nil 'below)
+ t))
+ (switch-to-buffer buffer t)
+ (when ask
+ (setq ask-value (read-string ask))
+ (kill-buffer buffer)
+ (delete-window window))
+ ask-value))
(defun mastodon-auth--request-authorization-code ()
"Ask authorization code and return it."