Function: query-replace-read-to

query-replace-read-to is a byte-compiled function defined in replace.el.gz.

Signature

(query-replace-read-to FROM PROMPT REGEXP-FLAG)

Documentation

Query and return the to argument of a query-replace operation.

Prompt with PROMPT. REGEXP-FLAG non-nil means the response should a regexp.

Source Code

;; Defined in /usr/src/emacs/lisp/replace.el.gz
(defun query-replace-read-to (from prompt regexp-flag)
  "Query and return the `to' argument of a `query-replace' operation.
Prompt with PROMPT.  REGEXP-FLAG non-nil means the response
should a regexp."
  (query-replace-compile-replacement
   (save-excursion
     (let* ((history-add-new-input nil)
	    (to (read-from-minibuffer
		 (format "%s %s with: " prompt (query-replace-descr from))
		 nil nil nil
		 query-replace-to-history-variable from t)))
       (add-to-history query-replace-to-history-variable to nil t)
       (add-to-history 'query-replace-defaults (cons from to) nil t)
       to))
   regexp-flag))