From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Local interface used for outbound network connections Date: 08 Jan 2003 17:54:44 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5x7kdfh99n.fsf@kfs2.cua.dk> References: <87ptr81sye.fsf@lexx.delysid.org> <5xof6rhncz.fsf@kfs2.cua.dk> <87u1gjzogj.fsf@lexx.delysid.org> <5xbs2rh9zd.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042041462 985 80.91.224.249 (8 Jan 2003 15:57:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2003 15:57:42 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18WIaI-0000FO-00 for ; Wed, 08 Jan 2003 16:57:38 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18WIfP-0006B8-00 for ; Wed, 08 Jan 2003 17:02:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WIZl-0006Ja-05 for emacs-devel@quimby.gnus.org; Wed, 08 Jan 2003 10:57:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18WIYm-0004iI-00 for emacs-devel@gnu.org; Wed, 08 Jan 2003 10:56:04 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18WIY2-00044u-00 for emacs-devel@gnu.org; Wed, 08 Jan 2003 10:55:49 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WIY0-000431-00 for emacs-devel@gnu.org; Wed, 08 Jan 2003 10:55:16 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id 82B027C012; Wed, 8 Jan 2003 16:55:15 +0100 (CET) Original-To: Mario Lang In-Reply-To: <5xbs2rh9zd.fsf@kfs2.cua.dk> Original-Lines: 18 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10583 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10583 I wrote: > You may thus simplify your code like this (format-network-address > returns nil if the address is nil): > > (defun erc-dcc-get-host (proc) > (let ((sockaddr (plist-get (process-contact erc-process t) :local))) > (format-network-address sockaddr t))) Actually, you can make this even simpler: (defun erc-dcc-get-host (proc) (format-network-address (process-contact proc :local) t)) I assume that you intended to use the PROC arg rather than erc-process? -- Kim F. Storm http://www.cua.dk