]> code.delx.au - gnu-emacs/commitdiff
* lisp/erc/erc-match.el (erc-match-message): Fix last commit.
authorAidan Gauland <aidalgol@no8wireless.co.nz>
Wed, 13 Feb 2013 04:02:11 +0000 (23:02 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 13 Feb 2013 04:02:11 +0000 (23:02 -0500)
lisp/erc/ChangeLog
lisp/erc/erc-match.el

index 3245c31384abd877152bc0f2222ee51bdc29fb41..f3d54782897521a0ca944a47ac51513fb5827ce8 100644 (file)
@@ -1,3 +1,7 @@
+2013-02-13  Aidan Gauland  <aidalgol@no8wireless.co.nz>
+
+       * erc-match.el (erc-match-message): Fix last commit.
+
 2013-02-12  Aidan Gauland  <aidalgol@no8wireless.co.nz>
 
        * erc-match.el (erc-match-message):
index 1da838557f7ab790c79bcf0c781bdca34aa3ba30..63683890226f1aba7ca8c8f6dd8a534c3dea0379 100644 (file)
@@ -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