Function: rcirc-send-input
rcirc-send-input is an interactive and byte-compiled function defined
in rcirc.el.gz.
Signature
(rcirc-send-input)
Documentation
Send input to target associated with the current buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
(defun rcirc-send-input ()
"Send input to target associated with the current buffer."
(interactive)
(if (< (point) rcirc-prompt-end-marker)
;; copy the line down to the input area
(progn
(forward-line 0)
(let ((start (if (eq (point) (point-min))
(point)
(if (get-text-property (1- (point)) 'hard)
(point)
(previous-single-property-change (point) 'hard))))
(end (next-single-property-change (1+ (point)) 'hard)))
(goto-char (point-max))
(insert (replace-regexp-in-string
"\n\\s-+" " "
(buffer-substring-no-properties start end)))))
;; process input
(goto-char (point-max))
(when (not (equal 0 (- (point) rcirc-prompt-end-marker)))
;; delete a trailing newline
(when (eq (point) (line-beginning-position))
(delete-char -1))
(let ((input (buffer-substring-no-properties
rcirc-prompt-end-marker (point))))
(dolist (line (split-string input "\n"))
(rcirc-process-input-line line))
;; add to input-ring
(save-excursion
(ring-insert rcirc-input-ring input)
(setq rcirc-input-ring-index 0))))))