(defun erc-select-read-args ()
"Prompt the user for values of nick, server, port, and password."
(let (user-input server port nick passwd)
- (setq user-input (read-from-minibuffer
+ (setq user-input (read-string
"IRC server: "
- (erc-compute-server) nil nil 'erc-server-history-list))
+ (erc-compute-server) 'erc-server-history-list))
(if (string-match "\\(.*\\):\\(.*\\)\\'" user-input)
(setq port (erc-string-to-port (match-string 2 user-input))
user-input (match-string 1 user-input))
(setq port
- (erc-string-to-port (read-from-minibuffer
+ (erc-string-to-port (read-string
"IRC port: " (erc-port-to-string
(erc-compute-port))))))
user-input (match-string 2 user-input))
(setq nick
(if (erc-already-logged-in server port nick)
- (read-from-minibuffer
+ (read-string
(erc-format-message 'nick-in-use ?n nick)
- nick
- nil nil 'erc-nick-history-list)
- (read-from-minibuffer
+ nick 'erc-nick-history-list)
+ (read-string
"Nickname: " (erc-compute-nick nick)
- nil nil 'erc-nick-history-list))))
+ 'erc-nick-history-list))))
(setq server user-input)
;; bnc with the same nick. actually it would be nice to have
;; bncs transparent, so that erc-compute-buffer-name displays
;; the server one is connected to.
- (setq nick (read-from-minibuffer
+ (setq nick (read-string
(erc-format-message 'nick-in-use ?n nick)
- nick
- nil nil 'erc-nick-history-list)))
+ nick 'erc-nick-history-list)))
(list :server server :port port :nick nick :password passwd)))
;;;###autoload
If USER is omitted, close the current query buffer if one exists
- except this is broken now ;-)"
(interactive
- (list (read-from-minibuffer "Start a query with: " nil)))
+ (list (read-string "Start a query with: ")))
(let ((session-buffer (erc-server-buffer))
(erc-join-buffer erc-query-display))
(if user
"Interactively input a user action and send it to IRC."
(interactive "")
(erc-set-active-buffer (current-buffer))
- (let ((action (read-from-minibuffer
- "Action: " nil nil nil 'erc-action-history-list)))
+ (let ((action (read-string "Action: " nil 'erc-action-history-list)))
(if (not (string-match "^\\s-*$" action))
(erc-send-action (erc-default-target) action))))
(completing-read (format-prompt "Join channel" chnl)
table nil nil nil nil chnl))
(when (or current-prefix-arg erc-prompt-for-channel-key)
- (read-from-minibuffer "Channel key (RET for none): " nil))))
+ (read-string "Channel key (RET for none): "))))
(erc-cmd-JOIN channel (when (>= (length key) 1) key)))
(defun erc-part-from-channel (reason)
"Part from the current channel and prompt for a REASON."
(interactive
+ ;; FIXME: Has this ever worked? We're in the interactive-spec, so the
+ ;; argument `reason' can't be in scope yet!
+ ;;(if (and (boundp 'reason) (stringp reason) (not (string= reason "")))
+ ;; reason
(list
- (if (and (boundp 'reason) (stringp reason) (not (string= reason "")))
- reason
- (read-from-minibuffer (concat "Reason for leaving " (erc-default-target)
- ": ")))))
+ (read-string (concat "Reason for leaving " (erc-default-target) ": "))))
(erc-cmd-PART (concat (erc-default-target)" " reason)))
(defun erc-set-topic (topic)
"Prompt for a TOPIC for the current channel."
(interactive
(list
- (read-from-minibuffer
+ (read-string
(concat "Set topic of " (erc-default-target) ": ")
(when erc-channel-topic
(let ((ss (split-string erc-channel-topic "\C-o")))
(defun erc-set-channel-limit (&optional limit)
"Set a LIMIT for the current channel. Remove limit if nil.
Prompt for one if called interactively."
- (interactive (list (read-from-minibuffer
+ (interactive (list (read-string
(format "Limit for %s (RET to remove limit): "
(erc-default-target)))))
(let ((tgt (erc-default-target)))
(defun erc-set-channel-key (&optional key)
"Set a KEY for the current channel. Remove key if nil.
Prompt for one if called interactively."
- (interactive (list (read-from-minibuffer
+ (interactive (list (read-string
(format "Key for %s (RET to remove key): "
(erc-default-target)))))
(let ((tgt (erc-default-target)))
(defun erc-quit-server (reason)
"Disconnect from current server after prompting for REASON.
`erc-quit-reason' works with this just like with `erc-cmd-QUIT'."
- (interactive (list (read-from-minibuffer
+ (interactive (list (read-string
(format "Reason for quitting %s: "
(or erc-server-announced-name
erc-session-server)))))