From: ueno Date: Mon, 7 Feb 2005 04:48:02 +0000 (+0000) Subject: * riece-filter.el (riece-filter): Simplified. X-Git-Tag: riece-1_0_7b X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d80bb5cc80da886401850bc40f68ec56b1f39e5c;p=elisp%2Friece.git * riece-filter.el (riece-filter): Simplified. --- 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"))