From d0009c7351874e853c63ce67cea6103f33afa60b Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Tue, 12 Feb 2013 23:02:11 -0500 Subject: [PATCH] * lisp/erc/erc-match.el (erc-match-message): Fix last commit. --- lisp/erc/ChangeLog | 4 ++++ lisp/erc/erc-match.el | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) 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 -- 2.39.5