Skip to content

Commit

Permalink
move 'debug-printf' to outside of 'unwind-protect' because we expect …
Browse files Browse the repository at this point in the history
…that mostly code of this function should be executed by way of BODYFORM of 'unwind-protect', not UNWINDFORM.
  • Loading branch information
yata committed Jan 6, 2010
1 parent 7cc1e3e commit 936bde2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
@@ -1,3 +1,14 @@
2010-01-06 Satoshi Yatagawa <yata_github@y.hauN.org>

* twittering-mode.el (twittering-http-get-default-sentinel): Move
`debug-printf' to outside of `unwind-protect' because we expect
that mostly code of this function should be executed by way of
BODYFORM of `unwind-protect', not UNWINDFORM.
(twittering-http-post-default-sentinel): Likewise.

* twittering-mode.el (twittering-http-get-list-index-sentinel): Add
`debug-printf' same as `twittering-http-get-default-sentinel'.

2010-01-04 Satoshi Yatagawa <yata_github@y.hauN.org>

* twittering-mode.el (twittering-get-response-header): Change
Expand Down
5 changes: 3 additions & 2 deletions twittering-mode.el
Expand Up @@ -900,8 +900,8 @@ Available keywords:
(cadr encoded-time))))

(defun twittering-http-get-default-sentinel (temp-buffer noninteractive proc stat &optional suc-msg)
(debug-printf "get-default-sentinel: proc=%s stat=%s" proc stat)
(unwind-protect
(debug-printf "get-default-sentinel: proc=%s stat=%s" proc stat)
(let ((header (twittering-get-response-header temp-buffer))
(body (twittering-get-response-body temp-buffer))
(status nil))
Expand Down Expand Up @@ -941,6 +941,7 @@ Available keywords:
;; XXX: this is a preliminary implementation because we should parse
;; xmltree in the function.
(defun twittering-http-get-list-index-sentinel (temp-buffer noninteractive proc stat &optional suc-msg)
(debug-printf "get-list-index-sentinel: proc=%s stat=%s" proc stat)
(unwind-protect
(let ((header (twittering-get-response-header temp-buffer)))
(if (not (string-match "HTTP/1\.[01] \\([a-zA-Z0-9 ]+\\)\r?\n" header))
Expand Down Expand Up @@ -985,8 +986,8 @@ PARAMETERS is alist of URI parameters.
host nil (concat "/" method ".xml") parameters noninteractive sentinel))

(defun twittering-http-post-default-sentinel (temp-buffer noninteractive proc stat &optional suc-msg)
(debug-printf "post-default-sentinel: proc=%s stat=%s" proc stat)
(unwind-protect
(debug-printf "post-default-sentinel: proc=%s stat=%s" proc stat)
(let ((header (twittering-get-response-header temp-buffer))
;; (body (twittering-get-response-body temp-buffer)) not used now.
(status nil))
Expand Down

0 comments on commit 936bde2

Please sign in to comment.