emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111758: * lisp/erc/erc-match.el (erc


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111758: * lisp/erc/erc-match.el (erc-match-message): Fix last commit.
Date: Tue, 12 Feb 2013 23:02:11 -0500
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111758
author: Aidan Gauland <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2013-02-12 23:02:11 -0500
message:
  * lisp/erc/erc-match.el (erc-match-message): Fix last commit.
modified:
  lisp/erc/ChangeLog
  lisp/erc/erc-match.el
=== modified file 'lisp/erc/ChangeLog'
--- a/lisp/erc/ChangeLog        2013-02-12 07:38:54 +0000
+++ b/lisp/erc/ChangeLog        2013-02-13 04:02:11 +0000
@@ -1,3 +1,7 @@
+2013-02-13  Aidan Gauland  <address@hidden>
+
+       * erc-match.el (erc-match-message): Fix last commit.
+
 2013-02-12  Aidan Gauland  <address@hidden>
 
        * erc-match.el (erc-match-message):

=== modified file 'lisp/erc/erc-match.el'
--- a/lisp/erc/erc-match.el     2013-02-11 22:53:36 +0000
+++ b/lisp/erc/erc-match.el     2013-02-13 04:02:11 +0000
@@ -447,7 +447,7 @@
                        (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 @@
         (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]