From c29ab70caf2fe4359a3166546a8f380443cc5240 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 16 Apr 2007 03:26:53 +0000 Subject: [PATCH] * riece-rdcc.el (riece-rdcc-server-port): New user option. (riece-rdcc-send-program): Bind `port'. --- lisp/ChangeLog | 4 +--- lisp/riece-rdcc.el | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0bbd3a3..e094a27 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,7 @@ 2007-04-16 Daiki Ueno - * riece-rdcc.el (riece-rdcc-server-address): Accept a cons cell to - specify the sending port. + * riece-rdcc.el (riece-rdcc-server-port): New user option. (riece-rdcc-send-program): Bind `port'. - (riece-command-dcc-send): Extract port from riece-rdcc-server-address. 2007-02-12 Daiki Ueno diff --git a/lisp/riece-rdcc.el b/lisp/riece-rdcc.el index 7c0d86d..09950b8 100644 --- a/lisp/riece-rdcc.el +++ b/lisp/riece-rdcc.el @@ -43,8 +43,13 @@ (defcustom riece-rdcc-server-address nil "Local address of the DCC server. Only used for sending files." - :type '(choice (string :tag "Address") - (cons (string :tag "Address") (integer :tag "Port"))) + :type 'string + :group 'riece-rdcc) + +(defcustom riece-rdcc-server-port nil + "Local address of the DCC server. +Only used for sending files." + :type 'integer :group 'riece-rdcc) (defcustom riece-rdcc-send-program @@ -148,17 +153,12 @@ end riece-rdcc-send-program (list (cons 'address (if riece-rdcc-server-address - (if (consp riece-rdcc-server-address) - (concat "'" (car riece-rdcc-server-address) - "'") - (concat "'" riece-rdcc-server-address - "'")) + (concat "'" riece-rdcc-server-address + "'") "nil")) (cons 'port - (if (and riece-rdcc-server-address - (consp riece-rdcc-server-address)) - (number-to-string - (cdr riece-rdcc-server-address)) + (if riece-rdcc-server-port + (number-to-string riece-rdcc-server-port) "0")) (cons 'file (concat "'" file "'")) -- 1.7.10.4