From: ueno Date: Fri, 30 May 2003 04:50:17 +0000 (+0000) Subject: * riece-highlight.el (riece-highlight-font-lock-keywords): X-Git-Tag: riece-0_0_2~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5870cf5004dbb8140f67c7f6a6a2a5b9928de825;p=elisp%2Friece.git * riece-highlight.el (riece-highlight-font-lock-keywords): Simplified regexp. * riece-ctcp.el (riece-handle-ctcp-request): Don't bind user. (riece-handle-ctcp-response): Ditto. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9396a18..295536f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2003-05-30 Daiki Ueno + * riece-highlight.el (riece-highlight-font-lock-keywords): + Simplified regexp. + + * riece-ctcp.el (riece-handle-ctcp-request): Don't bind user. + (riece-handle-ctcp-response): Ditto. + * riece-highlight.el: Make it an add-on. (riece-highlight-insinuate): New function. * riece.el: Don't require 'riece-highlight. diff --git a/lisp/riece-ctcp.el b/lisp/riece-ctcp.el index 4bd4101..d333af1 100644 --- a/lisp/riece-ctcp.el +++ b/lisp/riece-ctcp.el @@ -40,8 +40,7 @@ (defun riece-handle-ctcp-request (prefix string) (when (and prefix string (riece-prefix-nickname prefix)) - (let* ((user (riece-prefix-nickname prefix)) - (parameters (riece-split-parameters string)) + (let* ((parameters (riece-split-parameters string)) (targets (split-string (car parameters) ",")) (message (nth 1 parameters))) (if (string-match "\1\\([^ ]+\\)\\( .+\\)?\1" message) @@ -115,8 +114,7 @@ (defun riece-handle-ctcp-response (prefix string) (when (and prefix string (riece-prefix-nickname prefix)) - (let* ((user (riece-prefix-nickname prefix)) - (parameters (riece-split-parameters string)) + (let* ((parameters (riece-split-parameters string)) (targets (split-string (car parameters) ",")) (message (nth 1 parameters))) (if (string-match "\1\\([^ ]+\\)\\( .+\\)?\1" message) diff --git a/lisp/riece-highlight.el b/lisp/riece-highlight.el index 466e3cb..8360379 100644 --- a/lisp/riece-highlight.el +++ b/lisp/riece-highlight.el @@ -164,20 +164,19 @@ (append (list `(,(concat - "^\\(" riece-time-prefix-regexp "\\)?" - "\\(\\([][<>(-][][<>(-]?[^<>)]*[][<>)-][][<>)-]?\\)\\|" - "\\(=[^ ]*=\\|\\*\\*[^ \*]*\\*\\*\\)\\) ") - (3 riece-prefix-face append t))) + "^" riece-time-prefix-regexp + "\\(<[^>]+>\\|>[^<]+<\\|-[^-]+-\\|([^)]+)\\|=[^=]+=\\)") + (1 riece-prefix-face append t))) ;; set property to the whole line (mapcar (lambda (line) (cons (concat - "^\\(" riece-time-prefix-regexp "\\)?\\(" + "^" riece-time-prefix-regexp "\\(" (regexp-quote (symbol-value (intern (format "riece-%s-prefix" line)))) ".*\\)$") - (list 2 (intern (format "riece-%s-face" line)) t t))) + (list 1 (intern (format "riece-%s-face" line)) t t))) '(change notice wallops error info)) (list (list "(from [^)]+)$" 0 riece-server-face t))) "Normal and deformed faces for IRC normal line."