Subject: bug#2737: [PATCH] Emacs CVS: (rcirc): Save call args to history variables

From: Jari Aalto <[email-masked]>
Date: Sat, 21 Mar 2009 18:28:14 +0200

Patch against CVS as of 2009-03-21 16:27 UTC

2009-03-21  Jari Aalto  <[email-masked]>

        * net/rcirc.el (rcirc-history-server-name)
        (rcirc-history-server-port)
        (rcirc-history-nick-name): new variables.
        (rcirc): Use history variables.

>From 02c1deb5855e78168aab74b1199a48b72eb9656b Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email-masked]>
Date: Sat, 21 Mar 2009 18:25:11 +0200
Subject: [PATCH] lisp/net/rcirc.el: (rcirc): Save call args to history variables

---
 lisp/net/rcirc.el |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index f63237f..de4bdeb 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -359,6 +359,15 @@ and the cdr part is used for encoding."
 
 (defvar rcirc-startup-channels nil)
 
+(defvar rcirc-history-server-name nil
+  "History variable for \\[rcirc] call.")
+
+(defvar rcirc-history-server-port nil
+  "History variable for \\[rcirc] call.")
+
+(defvar rcirc-history-nick-name nil
+  "History variable for \\[rcirc] call.")
+
 ;;;###autoload
 (defun rcirc (arg)
   "Connect to all servers in `rcirc-server-alist'.
@@ -371,15 +380,18 @@ If ARG is non-nil, instead prompt for connection parameters."
       (let* ((server (completing-read "IRC Server: "
 				      rcirc-server-alist
 				      nil nil
-				      (caar rcirc-server-alist)))
+				      (caar rcirc-server-alist)
+				      'rcirc-history-server-name))
 	     (server-plist (cdr (assoc-string server rcirc-server-alist)))
 	     (port (read-string "IRC Port: "
 				(number-to-string
 				 (or (plist-get server-plist 'port)
-				     rcirc-default-port))))
+				     rcirc-default-port))
+				'rcirc-history-server-port))
 	     (nick (read-string "IRC Nick: "
 				(or (plist-get server-plist 'nick)
-				    rcirc-default-nick)))
+				    rcirc-default-nick)
+				'rcirc-history-nick-name))
 	     (channels (split-string
 			(read-string "IRC Channels: "
 				     (mapconcat 'identity
-- 
1.6.1.3