Skip to content

Commit

Permalink
Transfer sentinel functions via `connection-info'.
Browse files Browse the repository at this point in the history
* twittering-mode.el: Transfer sentinel functions to
`twittering-default-sentinel' via `connection-info'.
(twittering-start-http-session): transfer the variable `sentinel'
to `twittering-http-default-sentinel' via `connection-info'.
(twittering-http-default-sentinel): remove the arguments `func'
and `clean-up-sentinel'. The sentinel functions are retrieved from
`connection-info'.
  • Loading branch information
cvmat committed Sep 26, 2010
1 parent da6b520 commit d2e8ac7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Expand Up @@ -72,6 +72,14 @@
(twittering-ensure-connection-method): take account of
`twittering-oauth-use-ssl'.

* twittering-mode.el: Transfer sentinel functions to
`twittering-default-sentinel' via `connection-info'.
(twittering-start-http-session): transfer the variable `sentinel'
to `twittering-http-default-sentinel' via `connection-info'.
(twittering-http-default-sentinel): remove the arguments `func'
and `clean-up-sentinel'. The sentinel functions are retrieved from
`connection-info'.

2010-09-19 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Fix `twittering-push-uri-onto-kill-ring'.
Expand Down
17 changes: 8 additions & 9 deletions twittering-mode.el
Expand Up @@ -4334,14 +4334,11 @@ CLEAN-UP-SENTINEL: sentinel always executed."
(twittering-make-http-request method headers host port path
parameters post-body
twittering-use-ssl))
(additional-info `((noninteractive . ,noninteractive))))
(lexical-let ((clean-up-sentinel clean-up-sentinel)
(sentinel sentinel))
(twittering-send-http-request
request additional-info
(lambda (&rest args)
(apply #'twittering-http-default-sentinel
sentinel clean-up-sentinel args))))))
(additional-info `((noninteractive . ,noninteractive)
(clean-up-sentinel . ,clean-up-sentinel)
(sentinel . ,sentinel))))
(twittering-send-http-request request additional-info
#'twittering-http-default-sentinel)))

(defvar twittering-cert-file nil)

Expand Down Expand Up @@ -4609,12 +4606,14 @@ QUERY-PARAMETERS is a list of cons pair of name and value such as
(+ (* (car encoded-time) 65536)
(cadr encoded-time))))

(defun twittering-http-default-sentinel (func clean-up-sentinel proc stat connection-info &optional suc-msg)
(defun twittering-http-default-sentinel (proc stat connection-info &optional suc-msg)
(debug-printf "http-default-sentinel: proc=%s stat=%s exit-status=%s" proc stat (process-exit-status proc))
(let ((temp-buffer (process-buffer proc))
(status (process-status proc))
(exit-status (process-exit-status proc))
(authorization-queried (twittering-account-authorization-queried-p))
(func (cdr (assq 'sentinel connection-info)))
(clean-up-sentinel (cdr (assq 'clean-up-sentinel connection-info)))
(noninteractive (cdr (assq 'noninteractive connection-info)))
(mes nil))
(cond
Expand Down

0 comments on commit d2e8ac7

Please sign in to comment.