]> code.delx.au - gnu-emacs/blobdiff - lisp/erc/erc-match.el
Use new names for hooks rather than obsolete aliases
[gnu-emacs] / lisp / erc / erc-match.el
index 9fbe954467750f5bcc9862388a5bc5a5f0fa78a1..8dcdcb9e2e6eb63e8fd1a262cef10a614b5deee2 100644 (file)
@@ -3,6 +3,7 @@
 ;; Copyright (C) 2002-2012 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <asf@void.at>
+;; 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))