Function: network-connection-reconnect

network-connection-reconnect is an interactive and byte-compiled function defined in net-utils.el.gz.

Signature

(network-connection-reconnect)

Documentation

Reconnect a network connection, preserving the old input ring.

This command uses network-connection-service-alist, which see.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/net-utils.el.gz
(defun network-connection-reconnect  ()
  "Reconnect a network connection, preserving the old input ring.
This command uses `network-connection-service-alist', which see."
  (interactive)
  (let ((proc (get-buffer-process (current-buffer)))
	(old-comint-input-ring comint-input-ring)
	(host network-connection-host)
	(service network-connection-service))
    (if (not (or (not proc)
		 (eq (process-status proc) 'closed)))
	(message "Still connected")
      (goto-char (point-max))
      (insert (format "Reopening connection to %s\n" host))
      (network-connection host
			  (if (numberp service)
			      service
			    (cdr (assoc service network-connection-service-alist))))
      (and old-comint-input-ring
	   (setq comint-input-ring old-comint-input-ring)))))