diff --git a/ChangeLog b/ChangeLog index 24ca9e9a..ad48983e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -133,6 +133,10 @@ * twittering-mode.el (twittering-extract-timeline-spec): Fix the regexp for "search" timeline spec; same as for "filter". + * twittering-mode.el (twittering-make-clickable-status-datum): + When trying to add a text property to `source', check it is + non-nil first for avoiding an error caused by `string-match'. + 2010-02-07 Tadashi MATSUO * test/test-twittering-mode.el (test-format-status): replace the diff --git a/twittering-mode.el b/twittering-mode.el index d1f5733b..fa0f4ed4 100644 --- a/twittering-mode.el +++ b/twittering-mode.el @@ -2038,7 +2038,8 @@ If ID of STATUS-DATUM is already in ID-TABLE, return nil. If not, return t." (setq regexp-index (match-end 0))))) ;; make source pretty and clickable - (if (string-match "\\(.*\\)" source) + (if (and source + (string-match "\\(.*\\)" source)) (let ((uri (match-string-no-properties 1 source)) (caption (match-string-no-properties 2 source))) (setq source caption) @@ -2049,7 +2050,7 @@ If ID of STATUS-DATUM is already in ID-TABLE, return nil. If not, return t." face twittering-uri-face source ,source) source) - (add-to-list 'status (cons 'source source)) + (add-to-list 'status (cons 'source source)) )) ;; make hashtag in text clickable