From: Aidan Gauland Date: Wed, 13 Feb 2013 04:02:11 +0000 (-0500) Subject: * lisp/erc/erc-match.el (erc-match-message): Fix last commit. X-Git-Tag: emacs-24.3.90~173^2~7^2~65 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0009c7351874e853c63ce67cea6103f33afa60b;p=emacs.git * lisp/erc/erc-match.el (erc-match-message): Fix last commit. --- diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 3245c31384a..f3d54782897 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,7 @@ +2013-02-13 Aidan Gauland + + * erc-match.el (erc-match-message): Fix last commit. + 2013-02-12 Aidan Gauland * erc-match.el (erc-match-message): diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 1da838557f7..63683890226 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -447,7 +447,7 @@ Use this defun with `erc-insert-modify-hook'." (nth 0 (erc-parse-user nickuserhost)))) (old-pt (point)) (nick-beg (and nickname - (re-search-forward "\\(\\* \\)?"(regexp-quote nickname) + (re-search-forward (regexp-quote nickname) (point-max) t) (match-beginning 0))) (nick-end (when nick-beg @@ -455,14 +455,14 @@ Use this defun with `erc-insert-modify-hook'." (message (buffer-substring (if (and nick-end (<= (+ 2 nick-end) (point-max))) + ;; Message starts 2 characters after the nick + ;; except for CTCP ACTION messages. Nick + ;; surrounded by angle brackets only in normal + ;; messages. (+ nick-end - ;; Message starts 2 characters after the nick except - ;; for CTCP ACTION messages. - (if (string= "* " - (buffer-substring (- nick-beg 2) - nick-beg)) - 1 - 2)) + (if (eq ?> (char-after nick-end)) + 2 + 1)) (point-min)) (point-max)))) (when (and vector