Show
Ignore:
Timestamp:
03/15/08 10:35:08 (16 years ago)
Author:
hayamizu
Message:

replaced

Location:
lang/elisp/twittering-mode/branches/RB-0.3
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/elisp/twittering-mode/branches/RB-0.3/ChangeLog

    r11 r25  
     12008-03-15  Y. Hayamizu  <haya@haya-laptop-ubuntu> 
     2 
     3        * twittering-mode.el : pushをfree variableと誤認識されるバグ(再現できていない)のため,clのpushをlist-pushで置きかえ. 
     4        (list-push): clのpushの代替として定義. 
     5 
    162008-02-08  Tsuyoshi CHO  <Tsuyoshi.CHO+develop@Gmail.com> 
    27 
  • lang/elisp/twittering-mode/branches/RB-0.3/twittering-mode.el

    r11 r25  
    77;;         Tsuyoshi CHO <Tsuyoshi.CHO+develop@Gmail.com> 
    88;; Created: Sep 4, 2007 
    9 ;; Version: SVN-HEAD 
     9;; Version: 0.3 
    1010;; Keywords: twitter web 
    1111;; URL: http://lambdarepos.svnrepository.com/share/trac.cgi/browser/lang/elisp/twittering-mode 
     
    5050(defvar twittering-mode-map (make-sparse-keymap)) 
    5151 
    52 (defvar twittering-timer nil) 
     52(defvar twittering-timer nil "Timer object for timeline refreshing will be stored here. DO NOT SET VALUE MANUALLY.") 
    5353 
    5454(defvar twittering-idle-time 20) 
     
    107107(defun assocref (item alist) 
    108108  (cdr (assoc item alist))) 
     109(defmacro list-push (value listvar) 
     110  `(setq ,listvar (cons ,value ,listvar))) 
    109111 
    110112;;; Proxy 
     
    432434        (setq c (string-to-char (match-string-no-properties 1 format-str))) 
    433435        (if (> found-at cursor) 
    434             (push (substring format-str cursor found-at) result) 
     436            (list-push (substring format-str cursor found-at) result) 
    435437          "|") 
    436438        (setq cursor (match-end 1)) 
     
    438440        (case c 
    439441          ((?s)                         ; %s - screen_name 
    440            (push (attr 'user-screen-name) result)) 
     442           (list-push (attr 'user-screen-name) result)) 
    441443          ((?S)                         ; %S - name 
    442            (push (attr 'user-name) result)) 
     444           (list-push (attr 'user-name) result)) 
    443445          ((?i)                         ; %i - profile_image 
    444            (push (profile-image) result)) 
     446           (list-push (profile-image) result)) 
    445447          ((?d)                         ; %d - description 
    446            (push (attr 'user-description) result)) 
     448           (list-push (attr 'user-description) result)) 
    447449          ((?l)                         ; %l - location 
    448            (push (attr 'user-location) result)) 
     450           (list-push (attr 'user-location) result)) 
    449451          ((?L)                         ; %L - " [location]" 
    450452           (let ((location (attr 'user-location))) 
    451453             (unless (or (null location) (string= "" location)) 
    452                (push (concat " [" location "]") result)) )) 
     454               (list-push (concat " [" location "]") result)) )) 
    453455          ((?u)                         ; %u - url 
    454            (push (attr 'user-url) result)) 
     456           (list-push (attr 'user-url) result)) 
    455457          ((?j)                         ; %j - user.id 
    456            (push (attr 'user-id) result)) 
     458           (list-push (attr 'user-id) result)) 
    457459          ((?p)                         ; %p - protected? 
    458460           (let ((protected (attr 'user-protected))) 
    459461             (when (string= "true" protected) 
    460                (push "[x]" result)))) 
     462               (list-push "[x]" result)))) 
    461463          ((?c)                     ; %c - created_at (raw UTC string) 
    462            (push (attr 'created-at) result)) 
     464           (list-push (attr 'created-at) result)) 
    463465          ((?C) ; %C{time-format-str} - created_at (formatted with time-format-str) 
    464            (push (twittering-local-strftime 
     466           (list-push (twittering-local-strftime 
    465467                  (or (match-string-no-properties 2 format-str) "%H:%M:%S") 
    466468                  (attr 'created-at)) 
     
    474476             (let ((secs (+ (* (- (car now) (car created-at)) 65536) 
    475477                            (- (cadr now) (cadr created-at))))) 
    476                (push (cond ((< secs 5) "less than 5 seconds ago") 
     478               (list-push (cond ((< secs 5) "less than 5 seconds ago") 
    477479                           ((< secs 10) "less than 10 seconds ago") 
    478480                           ((< secs 20) "less than 20 seconds ago") 
     
    488490                     result)))) 
    489491          ((?t)                         ; %t - text 
    490            (push                        ;(clickable-text) 
     492           (list-push                   ;(clickable-text) 
    491493            (attr 'text) 
    492494            result)) 
     
    494496           (let ((truncated (attr 'truncated))) 
    495497             (when (string= "true" truncated) 
    496                (push "..." result)))) 
     498               (list-push "..." result)))) 
    497499          ((?f)                         ; %f - source 
    498            (push (attr 'source) result)) 
     500           (list-push (attr 'source) result)) 
    499501          ((?#)                         ; %# - id 
    500            (push (attr 'id) result)) 
     502           (list-push (attr 'id) result)) 
    501503          (t 
    502            (push (char-to-string c) result))) 
     504           (list-push (char-to-string c) result))) 
    503505        ) 
    504       (push (substring format-str cursor) result) 
     506      (list-push (substring format-str cursor) result) 
    505507      (apply 'concat (nreverse result)) 
    506508      ))) 
     
    779781                                   encoded-str cursor)) 
    780782          (when (> found-at cursor) 
    781             (push (substring encoded-str cursor found-at) result)) 
     783            (list-push (substring encoded-str cursor found-at) result)) 
    782784          (let ((number-entity (match-string-no-properties 2 encoded-str)) 
    783785                (letter-entity (match-string-no-properties 3 encoded-str))) 
    784786            (cond (number-entity 
    785                    (push 
     787                   (list-push 
    786788                    (char-to-string 
    787789                     (twittering-ucs-to-char 
    788790                      (string-to-number number-entity))) result)) 
    789791                  (letter-entity 
    790                    (cond ((string= "gt" letter-entity) (push ">" result)) 
    791                          ((string= "lt" letter-entity) (push "<" result)) 
    792                          (t push "?" result))) 
    793                   (t (push "?" result))) 
     792                   (cond ((string= "gt" letter-entity) (list-push ">" result)) 
     793                         ((string= "lt" letter-entity) (list-push "<" result)) 
     794                         (t (list-push "?" result)))) 
     795                  (t (list-push "?" result))) 
    794796            (setq cursor (match-end 0)))) 
    795         (push (substring encoded-str cursor) result) 
     797        (list-push (substring encoded-str cursor) result) 
    796798        (apply 'concat (nreverse result))) 
    797799    ""))