Fix the argument of `twittering-read-username-with-completion'.
Thanks to Akira Tamamori who reported a problem caused by the bug.

* twittering-mode.el: Fix the argument of the function
`twittering-read-username-with-completion'. Thanks to Akira
Tamamori who reported a problem caused by the bug.
(twittering-read-timeline-spec-with-completion): fix the argument
of the function `twittering-read-username-with-completion'.
Search content-type in a case-insensitive way according to RFC2616.
Thanks to luozengbin who reported the bug.

* twittering-mode.el: Search the content-type header from a HTTP
response in a case-insensitive way according to RFC2616. Thanks to
luozengbin who reported the bug.
(twittering-http-get-default-sentinel): fix the check of the
content-type header of a HTTP response. The content-type is now
searched in a case-insensitive way according to RFC2616.
Add new functions related to preparation for invoking APIs.

* twittering-mode.el: Add new functions related to preparation for
invoking APIs.
(twittering-add-application-header-to-http-request): confirm the
existence of OAuth token.
(twittering-api-invocation-is-ready-p): new function for checking
whether prerequisites for invoking APIs have been prepared without
side effects. Strictly speaking, this function may have a side
effect because the function `twittering-lookup-connection-type'
may change some variables.
(twittering-ensure-preparation-for-api-invocation): new function
for ensuring prerequisites for invoking APIs.
(twittering-visit-timeline): use the new function
`twittering-ensure-preparation-for-api-invocation'.
Signal an error when no valid connection method is found.

* twittering-mode.el: Signal an error when no valid connection
method is found on sending a HTTP request.
(twittering-send-http-request-internal): signal an error when no
valid connection method is found.
Bind `default-directory' to the temporary directory.
This prevents problems caused by executing programs on a removed
directory. Thanks to tomykaira who reported the problem.

* twittering-mode.el: Bind `default-directory' to the temporary
directory to avoid problems caused by executing programs on
a removed directory. Thanks to tomykaira who reported the problem.
(twittering-send-http-request-internal): locally bind the variable
`default-directory' to the temporary directory in order to prevent
Emacs from executing an external program in the invalid condition
where `default-directory' points to a directory which has been
already removed.
(twittering-start-http-session-curl-https-p): likewise.
(twittering-sha1): likewise.
(twittering-read-from-encrypted-file): likewise.
(twittering-write-and-encrypt): likewise.
(twittering-convert-image-data): likewise.
(twittering-save-icon-properties): likewise.
(twittering-load-icon-properties): likewise.
(twittering-initialize-global-variables-if-necessary): likewise.
Keep the private information unless it turns out to be invalid.

* twittering-mode.el: Keep the private information unless the
server explicitly informs that it is invalid.
(twittering-verify-credentials): display the reason of
authorization failure.
(twittering-http-get-verify-credentials-sentinel): keep the
private information for authorization unless the server returns
401(Unauthorized) as the HTTP response status code.
Remove obsolete tests of the obsolete feature.

* test/test-twittering-mode.el: Remove obsolete tests of the
obsolete feature related to `twittering-sign-string-function' and
`twittering-sign-simple-string'.
(test-sign-string): removed.
A tweet has a greater field ID than that of its ancestor tweets.

* twittering-mode.el: A tweet has a greater field ID than that of
its ancestor tweets. The order of field IDs matches with the order
in which tweets should be rendered.
(twittering-make-field-id): attach a greater field ID to normal
tweets than its ancestor tweets.
Use a common macro for rendering a status.

* twittering-mode.el: Use a common macro for rendering a status.
(twittering-render-a-field): new macro for rendering a status.
(twittering-render-timeline): use `twittering-render-a-field'.
(twittering-show-replied-statuses): use
`twittering-render-a-field'.
Accept list names including non-ASCII characters.

* twittering-mode.el: Accept list names including non-ASCII
characters.
(twittering-extract-timeline-spec): accept list names including
non-ASCII characters.
* test/test-twittering-mode.el (timeline-spec): add a test for a
list name including non-ASCII characters.
Fix the bug that obsolete macros may be used on byte-compilation.
Thanks to HKey who has discovered the bug.

* twittering-mode.el: Fix the bug that unconditionally adds
`emacs21' and `url-emacs21' into `load-path' on byte-compilation.
On byte-compilation, the directories `emacs21' and `url-emacs21',
which are included in the repository of twittering-mode, were
unconditionally added into `load-path'. Due to this bug, some
macros were embedded as obsolete definitions for Emacs21 in the
result of byte-compilation. Some functions in the result cause
errors on Emacs 22 or later because the obsolete definitions
conflict with Emacs newer than 21. On Emacs 22 or later, the
directories are no longer added to `load-path' on
byte-compilation.
Thanks to HKey who has discovered the bug.
Fix the strange cursor motion when moving it with logical lines.
Thanks to lemit who reported the problem.

* twittering-mode.el: Fix the strange behavior on moving the
cursor according to logical lines. Thanks to lemit who reported
the problem.
(twittering-mode-setup): bind `inhibit-field-text-motion' to
non-nil as a buffer-local variable. If it is nil, the field
property attached tweets interferes with the cursor motion based
on logical lines.
Store two tweet parameters as boolean parameters.

* twittering-mode.el: Store the tweet parameters, `truncated' and
`user-protected', as boolean parameters.
(twittering-normalize-raw-status): store the `truncated' and
`user-protected' parameters as boolean parameters.
(twittering-generate-format-table): use the `truncated' and
`user-protected' parameters as boolean.
(twittering-organic-retweet): likewise.
* test/test-twittering-mode.el: Update tests to follow the change
of internal representation of a tweet.
* test/fixture/timeline-data.el: Update data to follow the change
of internal representation of a tweet.
Store the tweet parameter `created-at' as Emacs internal time.

* twittering-mode.el: Store the tweet parameter `created-at' as
Emacs internal time representation. This avoids parsing a time
string whenever a tweet is re-rendered.
(twittering-atom-xmltree-to-status-datum): store `created-at' as
Emacs internal time representation.
(twittering-normalize-raw-status): likewise.
(twittering-created-at-to-seconds): removed.
(twittering-generate-format-table): use the parameters
`created-at' as Emacs internal time representation.
(twittering-generate-formater-for-first-spec): likewise.
* test/test-twittering-mode.el: Update tests to follow the change
of internal representation of a tweet.
* test/fixture/timeline-data.el: Update data to follow the change
of internal representation of a tweet.
`twittering-call-api' receives `sentinel' for `retrieve-timeline'.

* twittering-mode.el: `twittering-call-api' receives `sentinel' as
an argument for the command `retrieve-timeline'.
(twittering-call-api): receive `sentinel' as an argument for
the command `retrieve-timeline'.
`twittering-call-api' receives `format' for `retrieve-timeline'.

* twittering-mode.el: `twittering-call-api' receives `format' as
an argument for the command `retrieve-timeline'.
(twittering-http-get-default-sentinel): refer to `format' in
`connection-info' for parsing the retrieved content.
(twittering-call-api): receive `format' as an argument for the
command `retrieve-timeline'. The `format' is automatically added
to the last of `additional-info' for `twittering-http-get'.
Support retrieval of tweets as the JSON format.

* twittering-mode.el: Support retrieval of tweets as the JSON
format.
(twittering-http-get-default-sentinel): support the JSON format.
(twittering-extract-common-element-from-json): new function.
(twittering-json-object-to-a-status): new function.
(twittering-json-object-to-a-status-base): new function.
(twittering-json-object-to-a-status-on-search): new function.
Retrieve tweets as the JSON format if possible.

* twittering-mode.el: Retrieve tweets as the JSON format if
possible.
(twittering-get-and-render-timeline): retrieve tweets as the JSON
format if possible.
Render original URLs on a search timeline if possible.

* twittering-mode.el: Render a link wrapped by the t.co service as
the original URL on a search timeline if possible. This requires
`json.el'.
(twittering-call-api): retrieve a search timeline with entities.
Rearrange some codes for interpreting a JSON object.

* twittering-mode.el: Rearrange some codes for interpreting a JSON
object.
(twittering-json-object-to-a-status-base): rearrange codes for
interpreting a JSON object.