Commits

Anonymous committed 14ebd89

packages: Sync erc after cooperation with upstream

-------------------- ChangeLog entries follow: --------------------

xemacs-packages/erc/ChangeLog addition:

2005-10-21 Adrian Aichner <adrian@xemacs.org>

* Full sync with upstream revision 1.776.
* ChangeLog.upstream:
* Makefile (AUTHOR_VERSION):
* erc-compat.el:
* erc-compat.el (erc-compat-version):
* erc-compat.el (erc-make-obsolete): New.
* erc-compat.el (erc-make-obsolete-variable): New.
* erc-match.el:
* erc-match.el (erc-match-version):
* erc-match.el (erc-current-nick-highlight-type):
* erc-match.el (erc-beep-match-types): New.
* erc-match.el (erc-beep-on-match): New.
* erc-nets.el:
* erc-nets.el (erc-nets-version):
* erc-nets.el (erc-current-network):
* erc.el:
* erc.el (erc-version-string):
* erc.el (fboundp):
* erc.el (erc-send-command):

  • Participants
  • Parent commits 2d6e727

Comments (0)

Files changed (7)

+2005-10-21  Adrian Aichner  <adrian@xemacs.org>
+
+	* Full sync with upstream revision 1.776.
+	* ChangeLog.upstream:
+	* Makefile (AUTHOR_VERSION):
+	* erc-compat.el:
+	* erc-compat.el (erc-compat-version):
+	* erc-compat.el (erc-make-obsolete): New.
+	* erc-compat.el (erc-make-obsolete-variable): New.
+	* erc-match.el:
+	* erc-match.el (erc-match-version):
+	* erc-match.el (erc-current-nick-highlight-type):
+	* erc-match.el (erc-beep-match-types): New.
+	* erc-match.el (erc-beep-on-match): New.
+	* erc-nets.el:
+	* erc-nets.el (erc-nets-version):
+	* erc-nets.el (erc-current-network):
+	* erc.el:
+	* erc.el (erc-version-string):
+	* erc.el (fboundp):
+	* erc.el (erc-send-command):
+
 2005-10-16  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 0.18 released.

File ChangeLog.upstream

+2005-10-20  Diane Murray  <disumu@x3y2z1.net>
+
+	* erc-match.el (erc-current-nick-highlight-type): Set to `keyword'
+	as default.
+	(erc-beep-match-types): New variable.
+	(erc-text-matched-hook): Doc fix.  Added `erc-beep-on-match' to
+	customization options.
+	(erc-beep-on-match): New function.  If the MATCH-TYPE is found in
+	`erc-beep-match-types', beep.
+
+	* erc-compat.el (erc-make-obsolete, erc-make-obsolete-variable):
+	New functions to deal with the difference in the number of
+	arguments accepted by `make-obsolete' and `make-obsolete-variable'
+	in Emacs and XEmacs.
+	
+	* erc.el, erc-nets.el: Use `erc-make-obsolete' and
+	`erc-make-obsolete-variable'.
+
+	* erc-compat.el (erc-make-obsolete, erc-make-obsolete-variable):
+	Handle `wrong-number-of-arguments' error instead of checking for
+	xemacs feature as future versions of XEmacs might accept three
+	arguments.
+
+2005-10-18  Edward O'Connor  <ted@oconnor.cx>
+	
+	* erc.el: Tell emacs-lisp-mode how to font-lock define-erc-module
+	docstrings.
+	
 2005-10-08  Diane Murray  <disumu@x3y2z1.net>
 
 	* AUTHORS, CREDITS, ChangeLog, ChangeLog.2002, ChangeLog.2004:
 
 
 VERSION = 0.18
-AUTHOR_VERSION = Version 5.0 Revision: 1.774
+AUTHOR_VERSION = Version 5.0 Revision: 1.776
 MAINTAINER = Adrian Aichner <adrian@xemacs.org>
 PACKAGE = erc
 PKG_TYPE = regular

File erc-compat.el

 ;;; erc-compat.el --- ERC compatibility code for XEmacs
 
-;; Copyright (C) 2002,2003 Free Software Foundation, Inc.
+;; Copyright (C) 2002,2003,2005 Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <alex@gnu.org>
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?EmacsIRCClient
 	(t
 	 (error "Cannot find `cancel-timer' variant"))))
 
+;; Emacs accepts three arguments to `make-obsolete', `make-obsolete-variable'
+;; XEmacs only takes two arguments
+(defun erc-make-obsolete (old-name new-name when)
+  "Make the byte-compiler warn that OLD-NAME is obsolete.
+The warning will say that NEW-NAME should be used instead.
+WHEN should be a string indicating when the function was
+first made obsolete, either the file's revision number or an
+ERC release version number."
+  (condition-case nil
+      (make-obsolete old-name new-name when)
+    (wrong-number-of-arguments (make-obsolete old-name new-name))))
+
+(defun erc-make-obsolete-variable (old-name new-name when)
+  "Make the byte-compiler warn that OLD-NAME is obsolete.
+The warning will say that NEW-NAME should be used instead.
+WHEN should be a string indicating when the variable was
+first made obsolete, either the file's revision number or an
+ERC release version number."
+  (condition-case nil
+      (make-obsolete-variable old-name new-name when)
+    (wrong-number-of-arguments (make-obsolete-variable old-name new-name))))
+
 (provide 'erc-compat)
 
 ;;; erc-compat.el ends here

File erc-match.el

 ;;; erc-match.el --- Highlight messages matching certain regexps
 
-;; Copyright (C) 2002,2003,2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002,2003,2004,2005 Free Software Foundation, Inc.
 ;; Copyright (C) 2004 Jeremy Bertram Maitin-Shepard
 
 ;; Author: Andreas Fuchs <asf@void.at>
   :group 'erc-match
   :type '(repeat regexp))
 
-(defcustom erc-current-nick-highlight-type nil
+(defcustom erc-current-nick-highlight-type 'keyword
   "*Determines how to highlight text in which your current nickname appears
 \(does not apply to text sent by you\).
 
   :group 'erc-match
   :type 'string)
 
+(defcustom erc-beep-match-types '(current-nick)
+  "Types of matches to beep for when a match occurs.
+The function `erc-beep-on-match' needs to be added to `erc-text-matched-hook'
+for beeping to work."
+  :group 'erc-match
+  :type '(choice (repeat :tag "Beep on match" (choice
+					       (const current-nick)
+					       (const keyword)
+					       (const pal)
+					       (const dangerous-host)
+					       (const fool)))
+		 (const :tag "Don't beep" nil)))
+
 (defcustom erc-text-matched-hook '(erc-log-matches)
   "Hook run when text matches a given match-type.
 Functions in this hook are passed as arguments:
 \(match-type nick!user@host message) where MATCH-TYPE is a symbol of:
-keyword, pal, dangerous-host, fool"
-  :options '(erc-log-matches erc-hide-fools)
+current-nick, keyword, pal, dangerous-host, fool"
+  :options '(erc-log-matches erc-hide-fools erc-beep-on-match)
   :group 'erc-match
   :type 'hook)
 
 			    '(invisible intangible)
 			    (current-buffer))))
 
+(defun erc-beep-on-match (match-type nickuserhost message)
+  "Beep when text matches.
+This function is meant to be called from `erc-text-matched-hook'."
+  (when (member match-type erc-beep-match-types)
+    (beep)))
+
 (provide 'erc-match)
 
 ;;; erc-match.el ends here
 ;;; erc-nets.el --- IRC networks
 
-;; Copyright (C) 2002,2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002,2004,2005 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@lexx.delysid.org>
 ;; Keywords: comm
   (with-current-buffer (erc-server-buffer)
     (intern (downcase (symbol-name erc-network)))))
 
-(condition-case nil
-    (make-obsolete 'erc-current-network 'erc-network
+(erc-make-obsolete 'erc-current-network 'erc-network
 		   "Obsolete since erc-nets 1.5")
-  (wrong-number-of-arguments (make-obsolete 'erc-current-network
-					    'erc-network)))
 
 (defun erc-network-name ()
   "Returns the name of the current network as a string."
 (if (fboundp 'defvaralias)
     (progn
       (defvaralias 'erc-announced-server-name 'erc-server-announced-name)
-      (make-obsolete-variable 'erc-announced-server-name
-			      'erc-server-announced-name
-			      "ERC 5.1")
+      (erc-make-obsolete-variable 'erc-announced-server-name
+				  'erc-server-announced-name
+				  "ERC 5.1")
       (defvaralias 'erc-process 'erc-server-process)
-      (make-obsolete-variable 'erc-process 'erc-server-process "ERC 5.1")
+      (erc-make-obsolete-variable 'erc-process 'erc-server-process "ERC 5.1")
       (defvaralias 'erc-default-coding-system 'erc-server-coding-system)
-      (make-obsolete-variable 'erc-default-coding-system
-			      'erc-server-coding-system
-			      "ERC 5.1"))
+      (erc-make-obsolete-variable 'erc-default-coding-system
+				  'erc-server-coding-system
+				  "ERC 5.1"))
   (message (concat "ERC: You're using an old version of Emacs; "
 		   "this might break backward-compatibility attempts "
 		   "for old versions of ERC.")))
 
 (defalias 'erc-send-command 'erc-server-send)
-(make-obsolete 'erc-send-command 'erc-server-send "ERC 5.1")
+(erc-make-obsolete 'erc-send-command 'erc-server-send "ERC 5.1")
 
 ;; tunable connection and authentication parameters
 
 	     (quote
 	      ,mode))))))
 
+(put 'define-erc-module 'doc-string-elt 3)
+
 (defun erc-once-with-server-event (event &rest forms)
   "Execute FORMS the next time EVENT occurs in the `current-buffer'.