Skip to content

Commit

Permalink
Enable to retrieve icon images silently.
Browse files Browse the repository at this point in the history
* twittering-mode.el: Enable to retrieve icon images silently.
(twittering-url-show-status): new variable.
(twittering-url-wrapper): control display of status even if the
retrieval is asynchronous.
  • Loading branch information
cvmat committed May 15, 2010
1 parent 47c8f74 commit daba72a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Expand Up @@ -44,6 +44,11 @@
(twittering-setup-proxy): initialize individual proxy
configurations for HTTP and HTTPS.

* twittering-mode.el: Enable to retrieve icon images silently.
(twittering-url-show-status): new variable.
(twittering-url-wrapper): control display of status even if the
retrieval is asynchronous.

2010-05-11 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Fix initialization of `twittering-tls-program'.
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -52,6 +52,8 @@ existing way.
* HTTPS connection using `tls' library working with an external command
`gnutls' or `openssl' instead of `curl'.
* Individual proxy configurations for HTTP and HTTPS.
* Silent retrieval of icon images.
You can enable silent retrieval by "(setq twittering-url-show-status nil)".
* ...

### Bug fixes
Expand Down
13 changes: 11 additions & 2 deletions twittering-mode.el
Expand Up @@ -2585,12 +2585,21 @@ been initialized yet."
;;; Functions for URL library
;;;

(defvar twittering-url-show-status t
"*Whether to show a running total of bytes transferred.")
(defun twittering-url-wrapper (func &rest args)
(let ((url-proxy-services
(when twittering-proxy-use
(twittering-url-proxy-services)))
(url-show-status nil))
(apply func args)))
(url-show-status twittering-url-show-status))
(if (eq func 'url-retrieve)
(let ((buffer (apply func args)))
(when (buffer-live-p buffer)
(with-current-buffer buffer
(set (make-local-variable 'url-show-status)
twittering-url-show-status)))
buffer)
(apply func args))))

(defun twittering-url-insert-file-contents (url)
(twittering-url-wrapper 'url-insert-file-contents url))
Expand Down

0 comments on commit daba72a

Please sign in to comment.