diff options
Diffstat (limited to 'lisp/erc/erc-match.el')
-rw-r--r-- | lisp/erc/erc-match.el | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 0bafb43312c..63683890226 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -35,7 +35,6 @@ ;;; Code: (require 'erc) -(eval-when-compile (require 'cl)) ;; Customization: @@ -453,11 +452,19 @@ Use this defun with `erc-insert-modify-hook'." (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))) + ;; Message starts 2 characters after the nick + ;; except for CTCP ACTION messages. Nick + ;; surrounded by angle brackets only in normal + ;; messages. + (+ nick-end + (if (eq ?> (char-after nick-end)) + 2 + 1)) + (point-min)) + (point-max)))) (when (and vector (not (and erc-match-exclude-server-buffer (erc-server-buffer-p)))) |