- Timestamp:
- 03/31/08 22:27:35 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/xyzzy/hatena-bookmark-star-viewer/site-lisp/hatena-bookmark-star-viewer.l
r7719 r8573 6 6 ;; 7 7 ;; Author: MIYAMUKO Katsuyuki <miyamuko@gmail.com> 8 ;; Version: 0. 18 ;; Version: 0.3 9 9 ;; Keywords: hatena, star, bookmark 10 10 ;; … … 65 65 )) 66 66 67 (defmacro with-color ((&rest color) &body body) 68 (let ((s (gensym))) 69 `(let ((,s (buffer-stream-point *standard-output*))) 70 (progn ,@body) 71 (set-text-attribute ,s (buffer-stream-point *standard-output*) nil ,@color)))) 72 (setf (get 'with-color 'ed::lisp-indent-hook) 'with-output-to-buffer) 73 67 74 (defmacro puts (fmt &rest args) 68 `(format t ,fmt ,@args)) 75 `(progn 76 (toggle-read-only nil) 77 (format t ,fmt ,@args) 78 (toggle-read-only t))) 69 79 70 80 (defmacro $ (item alist) … … 107 117 (unless (get-buffer-window b) 108 118 (split-window (- (truncate (/ (window-height) 2)))) 109 (set-buffer b)))) 119 (set-buffer b) 120 (view-mode) 121 ))) 110 122 111 123 (defun render-hatena-star/bookmark (buffer uri entry bookmark) … … 146 158 (puts "はてなブックマーク数: ~A~%~%" (or ($ "count" bookmark) "0")) 147 159 (dolist (b ($ "bookmarks" bookmark)) 148 (puts "~A ~A ~{[~A]~}~A~%" 149 ($ "timestamp" b) ($ "user" b) 150 ($ "tags" b) ($ "comment" b))) 160 (with-color (:foreground 15) 161 (puts "~A ~A ~{[~A]~}~%~%" 162 ($ "timestamp" b) ($ "user" b) 163 ($ "tags" b))) 164 (let ((c ($ "comment" b))) 165 (when (and c (string/= c "")) 166 (puts "~A~%~%" c)))) 151 167 (puts "\n") 152 168 (when (and ($ "count" bookmark) (string/= ($ "count" bookmark) "0"))
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)