Function: edt-substitute

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

Signature

(edt-substitute NUM)

Documentation

Replace the selected region with the contents of the CUT buffer and.

Repeat the most recent FIND command. (The Emacs kill ring is used as the CUT buffer.) Argument NUM is the repeat count. A positive value indicates the of times to repeat the substitution. A negative argument means replace all occurrences of the search text.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/edt.el.gz
;;;
;;; SUBS
;;;

(defun edt-substitute (num)
  "Replace the selected region with the contents of the CUT buffer and.
Repeat the most recent FIND command.  (The Emacs kill ring is used as
the CUT buffer.)
Argument NUM is the repeat count.  A positive value indicates the of times
to repeat the substitution.  A negative argument means replace all occurrences
of the search text."
  (interactive "p")
  (cond ((or edt-select-mode (edt-check-match))
	 (while (and (not (= num 0)) (or edt-select-mode (edt-check-match)))
	   (edt-replace)
	   (edt-find-next)
	   (setq num (1- num))))
	(t
	 (error "No selection active"))))