summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-match.el
diff options
context:
space:
mode:
authorAidan Gauland <aidalgol@no8wireless.co.nz>2013-02-12 23:02:11 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2013-02-12 23:02:11 -0500
commitd0009c7351874e853c63ce67cea6103f33afa60b (patch)
tree8d79ab6abf5383bca3d27749879fe5dbacaf6d7b /lisp/erc/erc-match.el
parent83be8524033be471a4e91e9753809f36fd6fe718 (diff)
downloademacs-d0009c7351874e853c63ce67cea6103f33afa60b.tar.gz
* lisp/erc/erc-match.el (erc-match-message): Fix last commit.
Diffstat (limited to 'lisp/erc/erc-match.el')
-rw-r--r--lisp/erc/erc-match.el16
1 files changed, 8 insertions, 8 deletions
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