Permalink
Browse files

Add the variable `twittering-disable-overlay-on-too-long-string'.

* twittering-mode.el: Add the variable
`twittering-disable-overlay-on-too-long-string' in order to avoid
interference between the update of overlay and some input
methods.
(twittering-disable-overlay-on-too-long-string): new variable.
(twittering-edit-length-check): do not update the overlay if
`twittering-disable-overlay-on-too-long-string' is non-nil.
  • Loading branch information...
1 parent cbecbfb commit 4bdca2467ed2770c02225e182ada70840cdcf936 @cvmat cvmat committed May 21, 2011
Showing with 37 additions and 3 deletions.
  1. +8 −0 ChangeLog
  2. +8 −0 NEWS
  3. +7 −0 NEWS.ja
  4. +14 −3 twittering-mode.el
View
@@ -14,6 +14,14 @@
display a message whether the authorization succeeded or not.
`twittering-send-http-request' does not display it.
+ * twittering-mode.el: Add the variable
+ `twittering-disable-overlay-on-too-long-string' in order to avoid
+ interference between the update of overlay and some input
+ methods.
+ (twittering-disable-overlay-on-too-long-string): new variable.
+ (twittering-edit-length-check): do not update the overlay if
+ `twittering-disable-overlay-on-too-long-string' is non-nil.
+
2011-05-16 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Ensure that a sentinel is invoked when a
View
8 NEWS
@@ -14,6 +14,14 @@
In addition, `inherit-hashtags' and `inherit-any', the predefined
edit skeletons, insert hashtags if the current timeline is a search
timeline where the query string includes hashtags.
+* Disabling overlay on excessive string.
+ In default, `twittering-edit-mode' emphasizes too long strings by
+ putting the overlay `twittering-warning-overlay' on characters
+ following the 140th character. On some environments, however, some
+ input methods seem to interfere the update of the overlay. In such
+ case, you may avoid the problems by disabling the update of the
+ overlay as follows.
+ (setq twittering-disable-overlay-on-excessive-string t)
### Bug fixes
* Fix of displaying a message of authorization.
View
@@ -15,6 +15,13 @@
また、定義済みedit skeleton `inherit-hashtags'と`inherit-any'は現在
のtimelineがハッシュタグを含むようなsearch timelineである場合に、そ
のハッシュタグを自動で追加するよう変更されています。
+* 超過文字列の強調表示無効化
+ 通常、`twittering-edit-mode'では140字を超える部分にoverlay
+ `twittering-warning-overlay'を付加して強調表示するようになっています。
+ しかし環境によってはinput methodとこのoverlayの更新とが干渉して問題
+ を起こす場合があるようです。そのような場合、下記の設定でoverlayの付
+ 加を無効化すれば問題を回避できる可能性があります。
+ (setq twittering-disable-overlay-on-excessive-string t)
### バグ修正
* 認証成功・失敗についてのメッセージが表示されるよう修正
View
@@ -375,6 +375,16 @@ This value will be used only when showing new tweets.
See `twittering-show-replied-tweets' for more details.")
+(defvar twittering-disable-overlay-on-too-long-string nil
+ "*If non-nil, disable overlay on too long string on edit buffer.
+
+If nil, `twittering-edit-mode' puts an overlay `twittering-warning-overlay' on
+characters following the 140th character.
+
+On some environments, some input methods seem to interfere the update of the
+overlay. In such case, you may avoid the problems by setting this variable to
+non-nil.")
+
(defvar twittering-use-show-minibuffer-length t
"*Show current length of minibuffer if this variable is non-nil.
@@ -6990,9 +7000,10 @@ entry in `twittering-edit-skeleton-alist' are performed.")
(setq mode-name
(format "twmode-status-edit[%d/%d/140]" length maxlen))
(force-mode-line-update)
- (if (< maxlen length)
- (move-overlay twittering-warning-overlay (1+ maxlen) (1+ length))
- (move-overlay twittering-warning-overlay 1 1))))
+ (unless twittering-disable-overlay-on-too-long-string
+ (if (< maxlen length)
+ (move-overlay twittering-warning-overlay (1+ maxlen) (1+ length))
+ (move-overlay twittering-warning-overlay 1 1)))))
(defun twittering-edit-extract-status ()
(if (eq major-mode 'twittering-edit-mode)

0 comments on commit 4bdca24

Please sign in to comment.