Skip to content

Commit

Permalink
(twittering-use-show-minibuffer-length): new defvar to enable/disable…
Browse files Browse the repository at this point in the history
… a function which is show the number of charactors in minibuffer.
  • Loading branch information
yata committed Jan 1, 2010
1 parent 3f34c50 commit 59d1868
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
2010-01-02 Satoshi Yatagawa <yata_github@y.hauN.org>

* twittering-mode.el (twittering-use-show-minibuffer-length): New
defvar to enable/disable a function which is show the number of
charactors in minibuffer.
(twittering-update-status-from-minibuffer): Refer it to add/remove
hooks.

2009-12-30 Yuto Hayamizu <y.hayamizu@gmail.com>

* test/server.rb: add. Twitter API and Proxy mock server
Expand Down
11 changes: 8 additions & 3 deletions twittering-mode.el
Expand Up @@ -157,6 +157,8 @@ Items:
%% - %
")

(defvar twittering-use-show-minibuffer-length t
"*Show current length of minibuffer if this variable is non-nil.")
(defvar twittering-notify-successful-http-get t)

(defvar twittering-use-ssl t
Expand Down Expand Up @@ -1529,8 +1531,9 @@ following symbols;
(map minibuffer-local-map)
(minibuffer-message-timeout nil))
(define-key map (kbd "<f4>") 'twittering-tinyurl-replace-at-point)
(when twittering-use-show-minibuffer-length
(add-hook 'minibuffer-setup-hook 'twittering-setup-minibuffer t)
(add-hook 'minibuffer-exit-hook 'twittering-finish-minibuffer t)
(add-hook 'minibuffer-exit-hook 'twittering-finish-minibuffer t))
(unwind-protect
(while not-posted-p
(setq status (read-from-minibuffer prompt status map nil 'twittering-tweet-history nil t))
Expand All @@ -1548,8 +1551,10 @@ following symbols;
(twittering-http-post "twitter.com" "statuses/update" parameters)
(setq not-posted-p nil)))
))))
(remove-hook 'minibuffer-setup-hook 'twittering-setup-minibuffer)
(remove-hook 'minibuffer-exit-hook 'twittering-finish-minibuffer)
(when (memq 'twittering-setup-minibuffer minibuffer-setup-hook)
(remove-hook 'minibuffer-setup-hook 'twittering-setup-minibuffer))
(when (memq 'twittering-finish-minibuffer minibuffer-exit-hook)
(remove-hook 'minibuffer-exit-hook 'twittering-finish-minibuffer))
)))

(defun twittering-get-timeline (method &optional noninteractive id)
Expand Down

0 comments on commit 59d1868

Please sign in to comment.