Mercurial > emacs
comparison lisp/net/rcirc.el @ 103915:b22ca6941b7b
* net/rcirc.el (rcirc): Use history variables.
(rcirc-server-name-history, rcirc-nick-name-history)
(rcirc-server-port-history): New variables.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 15 Jul 2009 15:07:39 +0000 |
parents | 5c993497b6ee |
children | 521d6c4a95a9 |
comparison
equal
deleted
inserted
replaced
103914:49527a6bbe0b | 103915:b22ca6941b7b |
---|---|
357 | 357 |
358 (defconst rcirc-id-string (concat "rcirc on GNU Emacs " emacs-version)) | 358 (defconst rcirc-id-string (concat "rcirc on GNU Emacs " emacs-version)) |
359 | 359 |
360 (defvar rcirc-startup-channels nil) | 360 (defvar rcirc-startup-channels nil) |
361 | 361 |
362 (defvar rcirc-server-name-history nil | |
363 "History variable for \\[rcirc] call.") | |
364 | |
365 (defvar rcirc-server-port-history nil | |
366 "History variable for \\[rcirc] call.") | |
367 | |
368 (defvar rcirc-nick-name-history nil | |
369 "History variable for \\[rcirc] call.") | |
370 | |
362 ;;;###autoload | 371 ;;;###autoload |
363 (defun rcirc (arg) | 372 (defun rcirc (arg) |
364 "Connect to all servers in `rcirc-server-alist'. | 373 "Connect to all servers in `rcirc-server-alist'. |
365 | 374 |
366 Do not connect to a server if it is already connected. | 375 Do not connect to a server if it is already connected. |
369 (interactive "P") | 378 (interactive "P") |
370 (if arg | 379 (if arg |
371 (let* ((server (completing-read "IRC Server: " | 380 (let* ((server (completing-read "IRC Server: " |
372 rcirc-server-alist | 381 rcirc-server-alist |
373 nil nil | 382 nil nil |
374 (caar rcirc-server-alist))) | 383 (caar rcirc-server-alist) |
384 'rcirc-server-name-history)) | |
375 (server-plist (cdr (assoc-string server rcirc-server-alist))) | 385 (server-plist (cdr (assoc-string server rcirc-server-alist))) |
376 (port (read-string "IRC Port: " | 386 (port (read-string "IRC Port: " |
377 (number-to-string | 387 (number-to-string |
378 (or (plist-get server-plist :port) | 388 (or (plist-get server-plist :port) |
379 rcirc-default-port)))) | 389 rcirc-default-port)) |
390 'rcirc-server-port-history)) | |
380 (nick (read-string "IRC Nick: " | 391 (nick (read-string "IRC Nick: " |
381 (or (plist-get server-plist :nick) | 392 (or (plist-get server-plist :nick) |
382 rcirc-default-nick))) | 393 rcirc-default-nick) |
394 'rcirc-nick-name-history)) | |
383 (channels (split-string | 395 (channels (split-string |
384 (read-string "IRC Channels: " | 396 (read-string "IRC Channels: " |
385 (mapconcat 'identity | 397 (mapconcat 'identity |
386 (plist-get server-plist | 398 (plist-get server-plist |
387 :channels) | 399 :channels) |