Function: erc-load-irc-script-lines

erc-load-irc-script-lines is a byte-compiled function defined in erc.el.gz.

Signature

(erc-load-irc-script-lines LINES &optional FORCE NOEXPAND)

Documentation

Load IRC script LINES (a list of strings).

If optional NOEXPAND is non-nil, do not expand script-specific sequences, process the lines verbatim. Use this for multiline user input.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-load-irc-script-lines (lines &optional force noexpand)
  "Load IRC script LINES (a list of strings).

If optional NOEXPAND is non-nil, do not expand script-specific
sequences, process the lines verbatim.  Use this for multiline
user input."
  (let* ((cb (current-buffer))
         (s "")
         (sp (or (erc-command-indicator) (erc-prompt)))
         (args (and (boundp 'erc-script-args) erc-script-args)))
    (if (and args (string-match "^ " args))
        (setq args (substring args 1)))
    ;; prepare the prompt string for echo
    (erc-put-text-property 0 (length sp)
                           'font-lock-face 'erc-command-indicator-face sp)
    (while lines
      (setq s (car lines))
      (erc-log (concat "erc-load-script: CMD: " s))
      (unless (string-match "^\\s-*$" s)
        (let ((line (if noexpand s (erc-process-script-line s args))))
          (if (and (erc-process-input-line line force)
                   erc-script-echo)
              (progn
                (erc-put-text-property 0 (length line)
                                       'font-lock-face 'erc-input-face line)
                (erc-display-line (concat sp line) cb)))))
      (setq lines (cdr lines)))))