riece-format-message.
* riece-message.el (riece-format-message-1): Renamed from
riece-format-message.
(riece-format-message): Pick a function from
riece-message-format-function-alist.
+2007-05-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-log.el (riece-log-display-message-function): Just call
+ riece-format-message.
+
+ * riece-message.el (riece-format-message-1): Renamed from
+ riece-format-message.
+ (riece-format-message): Pick a function from
+ riece-message-format-function-alist.
+
2007-04-24 OHASHI Akira <bg66@koka-in.org>
* riece-log.el (riece-log-display-message-function): Use
default-file-name-coding-system)
(unless (file-directory-p (file-name-directory file))
(make-directory (file-name-directory file) t))
- (let ((format-message-function
- (or (cdr (assq (riece-message-type message)
- riece-message-format-function-alist))
- #'riece-format-message)))
- (write-region (concat (format-time-string "%H:%M") " "
- (funcall format-message-function message))
- nil file t 0
- riece-log-lock-file)))))
+ (write-region (concat (format-time-string "%H:%M") " "
+ (riece-format-message message))
+ nil file t 0
+ riece-log-lock-file))))
(defun riece-log-make-file-name (identity coding-system)
(expand-file-name (if (featurep 'mule)
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)))
-(defun riece-format-message (message &optional global)
+(defun riece-format-message-1 (message &optional global)
(let ((open-bracket
(funcall riece-message-make-open-bracket-function message))
(close-bracket
" " (riece-message-text message)))
"\n"))))
+(defun riece-format-message (message &optional global)
+ (apply (or (cdr (assq (riece-message-type message)
+ riece-message-format-function-alist))
+ #'riece-format-message-1)
+ message global))
+
(defun riece-display-message-1 (message)
(let ((buffer (riece-message-buffer message))
- (format-message-function
- (or (cdr (assq (riece-message-type message)
- riece-message-format-function-alist))
- #'riece-format-message))
parent-buffers)
(when (and buffer
(riece-message-own-p message)
(setq riece-freeze nil))
(riece-emit-signal 'buffer-freeze-changed buffer nil))
(setq parent-buffers (riece-message-parent-buffers message buffer))
- (riece-insert buffer (funcall format-message-function message))
- (riece-insert parent-buffers (funcall format-message-function message t))
+ (riece-insert buffer (riece-format-message message))
+ (riece-insert parent-buffers (riece-format-message message t))
(with-current-buffer buffer
(run-hook-with-args 'riece-after-display-message-functions message))))
"-H" "X-Twitter-Client-URL: http://riece.nongnu.org/twitter.xml"
"-u" riece-twitter-credential
"-d" (concat "status="
- (riece-twitter-escape-string (encode-coding-string (riece-message-text message) 'utf-8)))
+ (riece-twitter-escape-string
+ (encode-coding-string (riece-message-text message)
+ 'utf-8)))
"-s"
"http://twitter.com/statuses/update.json"))
message)