mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 10:57:34 +00:00
* lisp/erc/erc.el: Fix problem pointed out by compiler warning
[ Also use `read-string` instead of `read-from-minibuffer`. ] (erc-part-from-channel): Comment out improbable reference to the formal argument from within the interactive spec.
This commit is contained in:
parent
42751f440d
commit
fb779e9857
1 changed files with 21 additions and 23 deletions
|
|
@ -2144,15 +2144,15 @@ parameters SERVER and NICK."
|
|||
(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))))))
|
||||
|
||||
|
|
@ -2161,13 +2161,12 @@ parameters SERVER and NICK."
|
|||
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)
|
||||
|
||||
|
|
@ -2186,10 +2185,9 @@ parameters SERVER and NICK."
|
|||
;; 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
|
||||
|
|
@ -3511,7 +3509,7 @@ The type of query window/frame/etc will depend on the value of
|
|||
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
|
||||
|
|
@ -4023,8 +4021,7 @@ If FACE is non-nil, it will be used to propertize the prompt. If it is nil,
|
|||
"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))))
|
||||
|
||||
|
|
@ -4041,24 +4038,25 @@ If `point' is at the beginning of a channel name, use that as default."
|
|||
(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")))
|
||||
|
|
@ -4070,7 +4068,7 @@ If `point' is at the beginning of a channel name, use that as default."
|
|||
(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)))
|
||||
|
|
@ -4081,7 +4079,7 @@ Prompt for one if called interactively."
|
|||
(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)))
|
||||
|
|
@ -4092,7 +4090,7 @@ Prompt for one if called interactively."
|
|||
(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)))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue