Function: tpu-replace

tpu-replace is an interactive and byte-compiled function defined in tpu-edt.el.gz.

Signature

(tpu-replace)

Documentation

Replace the selected region with the contents of the cut buffer.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/tpu-edt.el.gz
;;;
;;;  Replace and Substitute
;;;
(defun tpu-replace nil
  "Replace the selected region with the contents of the cut buffer."
  (interactive)
  (cond ((tpu-mark)
	 (let ((beg (region-beginning)) (end (region-end)))
	   (setq tpu-last-replaced-text (buffer-substring beg end))
	   (delete-region beg end)
	   (insert tpu-last-deleted-region)
	   (tpu-unselect t)))
	((tpu-check-match)
	 (let ((beg (tpu-match-beginning)) (end (tpu-match-end)))
	   (setq tpu-last-replaced-text (buffer-substring beg end))
	   (replace-match tpu-last-deleted-region
			  (not case-replace) (not tpu-regexp-p))
	   (tpu-unset-match)))
	(t
	 (tpu-error "No selection active."))))