Show
Ignore:
Timestamp:
05/02/08 13:45:14 (16 years ago)
Author:
tsuyoshi
Message:

apply all patches

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/elisp/twittering-mode/branches/tsuyoshi/twittering-mode.el

    r40 r41  
    502502                   time-string url) 
    503503               (setq time-string 
    504                 (cond ((< secs 5) "less than 5 seconds ago") 
    505                       ((< secs 10) "less than 10 seconds ago") 
    506                       ((< secs 20) "less than 20 seconds ago") 
    507                       ((< secs 30) "half a minute ago") 
    508                       ((< secs 60) "less than a minute ago") 
    509                       ((< secs 150) "1 minute ago") 
    510                       ((< secs 2400) (format "%d minutes ago" 
    511                                              (/ (+ secs 30) 60))) 
    512                       ((< secs 5400) "about 1 hour ago") 
    513                       ((< secs 84600) (format "about %d hours ago" 
    514                                               (/ (+ secs 1800) 3600))) 
    515                       (t (format-time-string "%I:%M %p %B %d, %Y" created-at)))) 
     504                     (cond ((< secs 5) "less than 5 seconds ago") 
     505                           ((< secs 10) "less than 10 seconds ago") 
     506                           ((< secs 20) "less than 20 seconds ago") 
     507                           ((< secs 30) "half a minute ago") 
     508                           ((< secs 60) "less than a minute ago") 
     509                           ((< secs 150) "1 minute ago") 
     510                           ((< secs 2400) (format "%d minutes ago" 
     511                                                  (/ (+ secs 30) 60))) 
     512                           ((< secs 5400) "about 1 hour ago") 
     513                           ((< secs 84600) (format "about %d hours ago" 
     514                                                   (/ (+ secs 1800) 3600))) 
     515                           (t (format-time-string "%I:%M %p %B %d, %Y" created-at)))) 
    516516               (setq url (twittering-get-status-url (attr 'user-screen-name) (attr 'id))) 
    517517               ;; make status url clickable 
     
    539539        ) 
    540540      (list-push (substring format-str cursor) result) 
    541       (apply 'concat (nreverse result)) 
     541      (let ((formatted-status (apply 'concat (nreverse result)))) 
     542        (add-text-properties 0 (length formatted-status) 
     543                             `(username ,(attr 'user-screen-name)) 
     544                             formatted-status) 
     545        formatted-status) 
    542546      ))) 
    543547 
     
    705709 
    706710      ;; make username clickable 
    707       (add-text-properties 0 (length user-screen-name) 
    708                            `(mouse-face highlight 
    709                                         uri ,(concat "http://twitter.com/" user-screen-name) 
    710                                         username ,user-screen-name 
    711                                         face twittering-username-face) 
    712                            user-screen-name) 
     711      (add-text-properties 
     712       0 (length user-name) 
     713       `(mouse-face highlight 
     714                    uri ,(concat "http://twitter.com/" user-screen-name) 
     715                    face twittering-username-face) 
     716       user-name) 
     717 
     718      ;; make screen-name clickable 
     719      (add-text-properties 
     720       0 (length user-screen-name) 
     721       `(mouse-face highlight 
     722                    face twittering-username-face 
     723                    uri ,(concat "http://twitter.com/" user-screen-name) 
     724                    face twittering-username-face) 
     725       user-screen-name) 
    713726 
    714727      ;; make URI clickable 
     
    732745                   highlight 
    733746                   face twittering-uri-face 
    734                    username ,screen-name 
    735747                   uri ,(concat "http://twitter.com/" screen-name)) 
    736748               `(mouse-face highlight 
     
    740752          (setq regex-index (match-end 0)) )) 
    741753 
    742       ;; make screen-name clickable 
    743       (add-text-properties 
    744        0 (length user-screen-name) 
    745        `(mouse-face highlight 
    746                     face twittering-username-face 
    747                     uri ,(concat "http://twitter.com/" user-screen-name) 
    748                     username ,user-screen-name) 
    749        user-screen-name) 
    750754 
    751755      ;; make source pretty and clickable