From 04246c70d87ff7445334c5346564cbbe5027b76c Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 30 May 2003 04:50:17 +0000 Subject: [PATCH 1/1] * 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. --- lisp/ChangeLog | 6 ++++++ lisp/riece-ctcp.el | 6 ++---- lisp/riece-highlight.el | 11 +++++------ 3 files changed, 13 insertions(+), 10 deletions(-) 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." -- 2.25.1