Function: gnus-server-copy-server

gnus-server-copy-server is an interactive and byte-compiled function defined in gnus-srvr.el.gz.

Signature

(gnus-server-copy-server FROM TO)

Documentation

Copy a server definition to a new name.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-srvr.el.gz
(defun gnus-server-copy-server (from to)
  "Copy a server definition to a new name."
  (interactive (list
		(or (gnus-server-server-name)
		    (error "No server on the current line"))
		(read-string "Copy to: "))
	       gnus-server-mode)
  (unless from
    (error "No server on current line"))
  (unless (and to (not (string= to "")))
    (error "No name to copy to"))
  (when (assoc to gnus-server-alist)
    (error "%s already exists" to))
  (unless (gnus-server-to-method from)
    (error "%s: No such server" from))
  (let ((to-entry (cons from (copy-tree
			      (gnus-server-to-method from)))))
    (setcar to-entry to)
    (setcar (nthcdr 2 to-entry) to)
    (push to-entry gnus-server-killed-servers)
    (gnus-server-yank-server)))