Skip to content

Commit

Permalink
Fix indentation of the function `twittering-verify-credentials'.
Browse files Browse the repository at this point in the history
* twittering-mode.el: Fix indentation of the function
`twittering-verify-credentials'.
(twittering-verify-credentials): fix indentation.
  • Loading branch information
cvmat committed Jul 19, 2011
1 parent c8d716a commit 00c0e61
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 37 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2011-07-20 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Fix indentation of the function
`twittering-verify-credentials'.
(twittering-verify-credentials): fix indentation.

2011-07-16 Tadashi MATSUO <tad@mymail.twin.jp>

* test/test-twittering-mode.el: Add tests for HMAC-SHA1.
Expand Down
74 changes: 37 additions & 37 deletions twittering-mode.el
Expand Up @@ -4237,43 +4237,43 @@ If the authorization failed, return nil."
nil)
((twittering-has-oauth-access-token-p)
(let ((proc
(twittering-call-api
'verify-credentials
`((sentinel
. twittering-http-get-verify-credentials-sentinel)
(clean-up-sentinel
. twittering-http-get-verify-credentials-clean-up-sentinel))
`((username . ,(cdr (assoc "screen_name"
twittering-oauth-access-token-alist)))
(password . nil)))))
(cond
((null proc)
(message "Authorization failed. Type M-x twit to retry.")
(setq twittering-oauth-access-token-alist nil)
;; Failed to authorize the account.
nil)
(t
;; wait for verification to finish.
(twittering-wait-while nil 0.1
(and
(twittering-account-authorization-queried-p)
(twittering-process-alive-p proc)))
(if (not (twittering-account-authorization-queried-p))
;; The query is completed.
(twittering-account-authorized-p)
;; If the process has been dead, wait a moment because
;; Emacs may be in the middle of evaluating the sentinel.
(twittering-wait-while
10 0.1
(twittering-account-authorization-queried-p)
;; Succeeded in authorizing the account.
t
;; Display a message.
(message
"Status of Authorization process is `%s'. Type M-x twit to retry."
(process-status proc))
;; Failed to authorize the account.
nil))))))
(twittering-call-api
'verify-credentials
`((sentinel
. twittering-http-get-verify-credentials-sentinel)
(clean-up-sentinel
. twittering-http-get-verify-credentials-clean-up-sentinel))
`((username . ,(cdr (assoc "screen_name"
twittering-oauth-access-token-alist)))
(password . nil)))))
(cond
((null proc)
(message "Authorization failed. Type M-x twit to retry.")
(setq twittering-oauth-access-token-alist nil)
;; Failed to authorize the account.
nil)
(t
;; wait for verification to finish.
(twittering-wait-while nil 0.1
(and
(twittering-account-authorization-queried-p)
(twittering-process-alive-p proc)))
(if (not (twittering-account-authorization-queried-p))
;; The query is completed.
(twittering-account-authorized-p)
;; If the process has been dead, wait a moment because
;; Emacs may be in the middle of evaluating the sentinel.
(twittering-wait-while
10 0.1
(twittering-account-authorization-queried-p)
;; Succeeded in authorizing the account.
t
;; Display a message.
(message
"Status of Authorization process is `%s'. Type M-x twit to retry."
(process-status proc))
;; Failed to authorize the account.
nil))))))
((eq twittering-auth-method 'oauth)
(let* ((scheme (if twittering-oauth-use-ssl
"https"
Expand Down

0 comments on commit 00c0e61

Please sign in to comment.