From d80bb5cc80da886401850bc40f68ec56b1f39e5c Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 7 Feb 2005 04:48:02 +0000 Subject: [PATCH] * riece-filter.el (riece-filter): Simplified. --- lisp/ChangeLog | 2 ++ lisp/riece-filter.el | 17 ++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ed78350..5cfe9f4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-02-07 Daiki Ueno + * riece-filter.el (riece-filter): Simplified. + * riece-addon.el (riece-resolve-addons): Check the existence of riece-addon-directory. diff --git a/lisp/riece-filter.el b/lisp/riece-filter.el index 9182404..39edd49 100644 --- a/lisp/riece-filter.el +++ b/lisp/riece-filter.el @@ -72,25 +72,21 @@ (defun riece-filter (process input) (save-excursion (set-buffer (process-buffer process)) - (goto-char riece-read-point) - (unless riece-debug - (delete-region (riece-line-beginning-position) (point-min)) - (setq riece-read-point (point))) + (goto-char (point-max)) (insert input) - (goto-char (prog1 riece-read-point - (setq riece-read-point (point)))) + (goto-char riece-read-point) (beginning-of-line) (while (and (not (eobp)) (looking-at ".*\n")) ;the input line is not finished (save-excursion (if (looking-at - ":\\([^ ]+\\) +\\([0-5][0-9][0-9]\\) +\\([^ ]+\\) +\\(.*\\)\n") + ":\\([^ ]+\\) +\\([0-5][0-9][0-9]\\) +\\([^ ]+\\) +\\(.*\\)") (riece-handle-numeric-reply (match-string 1) ;prefix (string-to-number (match-string 2)) ;number (match-string 3) ;name (riece-chomp-string (match-string 4))) ;reply string - (if (looking-at "\\(:\\([^ ]+\\) +\\)?\\([^ ]+\\) +\\(.*\\)\n") + (if (looking-at "\\(:\\([^ ]+\\) +\\)?\\([^ ]+\\) +\\(.*\\)") (riece-handle-message (match-string 2) ;optional prefix (match-string 3) ;command @@ -100,7 +96,10 @@ (buffer-substring (point) (progn (end-of-line) (point)))))))) - (forward-line)))) + (forward-line)) + (unless riece-debug + (delete-region (point-min) (point))) + (setq riece-read-point (point)))) (eval-when-compile (autoload 'riece-exit "riece")) -- 1.7.10.4