Source

erc / erc-match.el

Diff from to

File erc-match.el

 ;;; erc-match.el --- Highlight messages matching certain regexps
 
-;; Copyright (C) 2002,2003,2004,2005 Free Software Foundation, Inc.
-;; Copyright (C) 2004 Jeremy Bertram Maitin-Shepard
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <asf@void.at>
 ;; Keywords: comm, faces
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcMatch
 
-;; This file is free software; you can redistribute it and/or modify
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation; either version 2, or (at your option)
 ;; any later version.
 
-;; This file is distributed in the hope that it will be useful,
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-;; Boston, MA 02110-1301 USA
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
 ;;; Code:
 
 (require 'erc)
+(eval-when-compile (require 'cl))
 
 ;; Customisation:
 
 `erc-current-nick-highlight-type'.  For all these highlighting types,
 you can decide whether the entire message or only the sending nick is
 highlighted."
-  ((add-hook 'erc-insert-modify-hook 'erc-match-message))
+  ((add-hook 'erc-insert-modify-hook 'erc-match-message 'append))
   ((remove-hook 'erc-insert-modify-hook 'erc-match-message)))
 
 ;; Remaining customizations
       (let ((line (format-spec erc-log-match-format
 		   (format-spec-make
 		    ?n nick
-		    ?t (format-time-string (or erc-timestamp-format
-					       "[%Y-%m-%d %H:%M] "))
+		    ?t (format-time-string
+			(or (and (boundp 'erc-timestamp-format)
+				 erc-timestamp-format)
+			    "[%Y-%m-%d %H:%M] "))
 		    ?c (or (erc-default-target) "")
 		    ?m message
 		    ?u nickuserhost))))
 ;; indent-tabs-mode: t
 ;; tab-width: 8
 ;; End:
+
+;; arch-tag: 1f1f595e-abcc-4b0b-83db-598a1d3f0f82