]> code.delx.au - gnu-emacs/commitdiff
Aidan Gauland <aidalgol@no8wireless.co.nz>
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 11 Feb 2013 22:53:36 +0000 (17:53 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 11 Feb 2013 22:53:36 +0000 (17:53 -0500)
Fixes: debbugs:13689
* lisp/erc/erc-match.el (erc-match-message): Don't truncate action messages.

lisp/ChangeLog
lisp/erc/erc-match.el

index 7995703e4a5274c5f6787e347d9e2348b71aac39..fd2186fcfb2cdce6458f79897c64b41b65de2aab 100644 (file)
@@ -1,7 +1,7 @@
 2013-02-11  Elias Pipping  <pipping@lavabit.com>
 
        * doc-view.el (doc-view-current-cache-dir): Beware % escapes
-       (bug#13679).
+       (bug#13689).
 
 2013-02-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
index 7ca86b5ac955f6582dc091e6f10299e975f2fac5..1da838557f7ab790c79bcf0c781bdca34aa3ba30 100644 (file)
@@ -447,16 +447,24 @@ 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
                     (match-end 0)))
-        (message (buffer-substring (if (and nick-end
-                                            (<= (+ 2 nick-end) (point-max)))
-                                       (+ 2 nick-end)
-                                     (point-min))
-                                   (point-max))))
+        (message (buffer-substring
+                  (if (and nick-end
+                           (<= (+ 2 nick-end) (point-max)))
+                      (+ 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))
+                    (point-min))
+                  (point-max))))
     (when (and vector
               (not (and erc-match-exclude-server-buffer
                         (erc-server-buffer-p))))