Skip to content

Commit

Permalink
Do not initialize `twittering-tls-program' multiple times.
Browse files Browse the repository at this point in the history
* twittering-mode.el: Do not initialize `twittering-tls-program'
multiple times.
(twittering-start-http-session-native-tls-p): check `tls-program'
only if `twittering-tls-program' is nil.
  • Loading branch information
cvmat committed May 22, 2010
1 parent ab59072 commit 346d5f7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Expand Up @@ -13,6 +13,11 @@
(twittering-get-response-header): do not remove headers from a
proxy.

* twittering-mode.el: Do not initialize `twittering-tls-program'
multiple times.
(twittering-start-http-session-native-tls-p): check `tls-program'
only if `twittering-tls-program' is nil.

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

* twittering-mode.el: The configuration of a proxy is referred via
Expand Down
19 changes: 10 additions & 9 deletions twittering-mode.el
Expand Up @@ -3007,15 +3007,16 @@ Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv

(defun twittering-start-http-session-native-tls-p ()
(when (require 'tls nil t)
(let ((programs
(remove nil
(mapcar (lambda (cmd)
(when (string-match "\\`\\([^ ]+\\) " cmd)
(when (executable-find (match-string 1 cmd))
cmd)))
(or twittering-tls-program tls-program)))))
(setq twittering-tls-program programs)
programs)))
(unless twittering-tls-program
(let ((programs
(remove nil
(mapcar (lambda (cmd)
(when (string-match "\\`\\([^ ]+\\) " cmd)
(when (executable-find (match-string 1 cmd))
cmd)))
tls-program))))
(setq twittering-tls-program programs)))
(not (null twittering-tls-program))))

;; TODO: proxy
(defun twittering-start-http-session-native (method headers host port path parameters &optional noninteractive sentinel)
Expand Down

0 comments on commit 346d5f7

Please sign in to comment.