Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

(twittering-get-error-message): change the first argument to 'buffer'…

… from 'proc'.
  • Loading branch information...
commit cb9333c4b2271ac8e5c96c52c7c14ac461cbf2e6 1 parent 8cfb9f8
@yata yata authored
Showing with 16 additions and 8 deletions.
  1. +6 −0 ChangeLog
  2. +10 −8 twittering-mode.el
View
6 ChangeLog
@@ -4,6 +4,12 @@
Call `twittering-decode-html-entities' to decode entities
properly.
+ * twittering-mode.el (twittering-get-error-message): Change the
+ first argument to `buffer' from `proc'.
+ (twittering-http-get-default-sentinel): Adjust callers.
+ (twittering-http-get-list-index-sentinel): Likewise.
+ (twittering-http-post-default-sentinel): Likewise.
+
2010-02-20 Satoshi Yatagawa <yata_github@y.hauN.org>
* twittering-mode.el (twittering-current-timeline-spec): Check
View
18 twittering-mode.el
@@ -1688,11 +1688,13 @@ Available keywords:
headers
))
-(defun twittering-get-error-message (proc)
- (let ((xmltree (twittering-get-response-body (process-buffer proc)
- 'xml-parse-region)))
- (car (cddr (assq 'error (or (assq 'errors xmltree)
- (assq 'hash xmltree)))))))
+(defun twittering-get-error-message (buffer)
+ (if buffer
+ (let ((xmltree (twittering-get-response-body buffer
+ 'xml-parse-region)))
+ (car (cddr (assq 'error (or (assq 'errors xmltree)
+ (assq 'hash xmltree))))))
+ nil))
(defun twittering-http-get (host method &optional noninteractive parameters format sentinel)
(if (null format)
@@ -1753,7 +1755,7 @@ Available keywords:
(if suc-msg suc-msg "Success: Get.")
nil)))
(t
- (let ((error-mes (twittering-get-error-message proc)))
+ (let ((error-mes (twittering-get-error-message (process-buffer proc))))
(if error-mes
(format "Response: %s; %s" status-line error-mes)
(format "Response: %s" status-line)))))))
@@ -1783,7 +1785,7 @@ Available keywords:
))
))))
(t
- (let ((error-mes (twittering-get-error-message proc)))
+ (let ((error-mes (twittering-get-error-message (process-buffer proc))))
(if error-mes
(setq mes (format "Response: %s; %s" status-line error-mes))
(setq mes (format "Response: %s" status-line))))))
@@ -1819,7 +1821,7 @@ FORMAT is a response data format (\"xml\", \"atom\", \"json\")"
(("200")
(if suc-msg suc-msg "Success: Post."))
(t
- (let ((error-mes (twittering-get-error-message proc)))
+ (let ((error-mes (twittering-get-error-message (process-buffer proc))))
(if error-mes
(format "Response: %s; %s" status-line error-mes)
(format "Response: %s" status-line)))))))
Please sign in to comment.
Something went wrong with that request. Please try again.