erc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-commit] [commit][master] erc-coding-system-for-target: Pass the `ta


From: mwolson
Subject: [Erc-commit] [commit][master] erc-coding-system-for-target: Pass the `target' argument along.
Date: Mon, 14 Jan 2008 22:40:06 -0500

commit 10b6e1b5009893986b310c2d55b91ec7de010f54
Author: Michael W. Olson <address@hidden>
Date:   Mon Jan 14 22:33:06 2008 -0500

    erc-coding-system-for-target: Pass the `target' argument along.

diff --git a/ChangeLog b/ChangeLog
index eb455d9..ad6245d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-15  Michael Olson  <address@hidden>
+
+       * erc-backend.el (erc-server-coding-system): Docfix.
+       (erc-coding-system-for-target): Pass the `target' argument along
+       as the first and only argument.  It's not good to just depend on a
+       dynamic binding.
+
 2008-01-10  Michael Olson  <address@hidden>
 
        * erc-backend.el (321, 322): Split message-displaying parts into
diff --git a/erc-backend.el b/erc-backend.el
index e5181fe..e2fb1d7 100644
--- a/erc-backend.el
+++ b/erc-backend.el
@@ -332,11 +332,10 @@ This is either a coding system, a cons, a function, or 
nil.
 
 If a cons, the encoding system for outgoing text is in the car
 and the decoding system for incoming text is in the cdr. The most
-interesting use for this is to put `undecided' in the cdr. If a
-function, it is called with no arguments and should return a
-coding system or a cons as described above. Note that you can use
-the dynamically bound variable `target' to get the current
-target. See `erc-coding-system-for-target'.
+interesting use for this is to put `undecided' in the cdr.
+
+If a function, it is called with the argument `target' and should
+return a coding system or a cons as described above.
 
 If you need to send non-ASCII text to people not using a client that
 does decoding on its own, you must tell ERC what encoding to use.
@@ -686,7 +685,7 @@ This is determined via `erc-encoding-coding-alist' or
               (when (string-match (car pat) target)
                 (throw 'match (cdr pat)))))))
       (and (functionp erc-server-coding-system)
-           (funcall erc-server-coding-system))
+           (funcall erc-server-coding-system target))
       erc-server-coding-system))
 
 (defun erc-decode-string-from-target (str target)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]