(riece-ctlseq-requires): New function.
(riece-ctlseq-message-filter): Assume the existence of
riece-put-overlay-faces, add 'riece-overlay-face property.
* riece-keyword.el (riece-keyword-scan-region): Abolish.
(riece-keyword-message-filter): Assume the existence of
riece-put-overlay-faces, add 'riece-overlay-face property.
* riece-highlight.el (riece-put-overlay-faces): New function.
(riece-highlight-insinuate): Add riece-put-overlay-faces to
riece-after-insert-functions.
+2004-05-10 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctlseq.el (riece-ctlseq-scan-region): Abolish.
+ (riece-ctlseq-requires): New function.
+ (riece-ctlseq-message-filter): Assume the existence of
+ riece-put-overlay-faces, add 'riece-overlay-face property.
+
+ * riece-keyword.el (riece-keyword-scan-region): Abolish.
+ (riece-keyword-message-filter): Assume the existence of
+ riece-put-overlay-faces, add 'riece-overlay-face property.
+
+ * riece-highlight.el (riece-put-overlay-faces): New function.
+ (riece-highlight-insinuate): Add riece-put-overlay-faces to
+ riece-after-insert-functions.
+
2004-05-05 Daiki Ueno <ueno@unixuser.org>
* riece-misc.el (riece-split-parameters): Don't remove a trailing
(match-string 0 (riece-message-text message)) attrs)))
(if (and (< start end) attrs)
(put-text-property start end
- 'riece-ctlseq-attributes (copy-sequence attrs)
+ 'riece-overlay-face
+ (riece-ctlseq-face-from-cache attrs)
(riece-message-text message))))
message)
-(defun riece-ctlseq-scan-region (start end)
- (riece-scan-property-region
- 'riece-ctlseq-attributes
- start end
- (lambda (start end)
- (riece-overlay-put (riece-make-overlay start end)
- 'face
- (riece-ctlseq-face-from-cache
- (get-text-property start
- 'riece-ctlseq-attributes))))))
+(defun riece-ctlseq-requires ()
+ '(riece-highlight))
(defun riece-ctlseq-insinuate ()
- (add-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter)
- (add-hook 'riece-after-insert-functions 'riece-ctlseq-scan-region))
+ (add-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter))
(provide 'riece-ctlseq)
(if (looking-at riece-prefix-regexp)
(put-text-property (match-beginning 1) (match-end 1) 'invisible t))))
+(defun riece-put-overlay-faces (start end)
+ (riece-scan-property-region
+ 'riece-overlay-face
+ start end
+ (lambda (start end)
+ (riece-overlay-put (riece-make-overlay start end)
+ 'face
+ (get-text-property start 'riece-overlay-face)))))
+
(defun riece-channel-list-turn-on-font-lock ()
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(riece-channel-list-font-lock-keywords t))
(add-hook 'riece-after-load-startup-hook
'riece-channel-list-schedule-turn-on-font-lock)
(add-hook 'riece-format-identity-for-channel-list-indicator-functions
- 'riece-highlight-format-identity-for-channel-list-indicator))
+ 'riece-highlight-format-identity-for-channel-list-indicator)
+ (add-hook 'riece-after-insert-functions 'riece-put-overlay-faces))
(provide 'riece-highlight)
(setq index 0)
(while (string-match (car (car alist))
(riece-message-text message) index)
- (if (memq 'riece-highlight riece-addons)
- (put-text-property (match-beginning (cdr (car alist)))
- (match-end (cdr (car alist)))
- 'riece-keyword t
- (riece-message-text message)))
+ (put-text-property (match-beginning (cdr (car alist)))
+ (match-end (cdr (car alist)))
+ 'riece-overlay-face riece-keyword-face
+ (riece-message-text message))
(run-hook-with-args 'riece-notify-keyword-functions
(match-string (cdr (car alist))
(riece-message-text message)))
(setq alist (cdr alist)))))
message)
-(defun riece-keyword-scan-region (start end)
- (riece-scan-property-region
- 'riece-keyword
- start end
- (lambda (start end)
- (riece-overlay-put (riece-make-overlay start end)
- 'face riece-keyword-face))))
-
(defun riece-keyword-requires ()
(if (memq 'riece-highlight riece-addons)
'(riece-highlight)))
(defun riece-keyword-insinuate ()
- (add-hook 'riece-message-filter-functions 'riece-keyword-message-filter)
- (add-hook 'riece-after-insert-functions 'riece-keyword-scan-region))
+ (add-hook 'riece-message-filter-functions 'riece-keyword-message-filter))
(provide 'riece-keyword)