X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/8c74a125c85da08e34dceedb271b71b5f09ce690..7b1bf1735e58fbadbe180d4bbbe3a00cf71baed4:/lisp/erc/erc-match.el diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 9fbe954467..8dcdcb9e2e 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2002-2012 Free Software Foundation, Inc. ;; Author: Andreas Fuchs +;; Maintainer: FSF ;; Keywords: comm, faces ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcMatch @@ -29,7 +30,7 @@ ;; customizable variables. ;; Usage: -;; Put (erc-match-mode 1) into your ~/.emacs file. +;; Put (erc-match-mode 1) into your init file. ;;; Code: @@ -232,6 +233,14 @@ current-nick, keyword, pal, dangerous-host, fool" :group 'erc-match :type 'hook) +(defcustom erc-match-exclude-server-buffer nil + "If true, don't perform match on the server buffer; this is +useful for excluding all the things like MOTDs from the server +and other miscellaneous functions." + :group 'erc-match + :version "24.3" + :type 'boolean) + ;; Internal variables: ;; This is exactly the same as erc-button-syntax-table. Should we @@ -449,7 +458,9 @@ Use this defun with `erc-insert-modify-hook'." (+ 2 nick-end) (point-min)) (point-max)))) - (when vector + (when (and vector + (not (and erc-match-exclude-server-buffer + (erc-server-buffer-p)))) (mapc (lambda (match-type) (goto-char (point-min))