diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-02-11 17:53:36 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-02-11 17:53:36 -0500 |
commit | 6659b59ccb7909a07f71a0143fd9d85e60b8e414 (patch) | |
tree | bd978ed3b74bc54990bef5053dfeb72ccdeffed1 /lisp/erc/erc-match.el | |
parent | b09a48104f3459c0a849cf29716fce3493b26462 (diff) | |
download | emacs-6659b59ccb7909a07f71a0143fd9d85e60b8e414.tar.gz |
Aidan Gauland <aidalgol@no8wireless.co.nz>
Fixes: debbugs:13689
* lisp/erc/erc-match.el (erc-match-message): Don't truncate action messages.
Diffstat (limited to 'lisp/erc/erc-match.el')
-rw-r--r-- | lisp/erc/erc-match.el | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 7ca86b5ac95..1da838557f7 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -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)))) |