Function: query-replace-read-from-suggestions

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

Signature

(query-replace-read-from-suggestions)

Documentation

Return a list of standard suggestions for query-replace-read-from.

By default, the list includes the active region, the identifier
(a.k.a. "tag") at point (see Info node (emacs) Identifier Search),
the last isearch string, and the last replacement regexp. query-replace-read-from appends the list returned by this function to the end of values available via M-n (next-history-element).

Source Code

;; Defined in /usr/src/emacs/lisp/replace.el.gz
(defun query-replace-read-from-suggestions ()
  "Return a list of standard suggestions for `query-replace-read-from'.
By default, the list includes the active region, the identifier
(a.k.a. \"tag\") at point (see Info node `(emacs) Identifier Search'),
the last isearch string, and the last replacement regexp.
`query-replace-read-from' appends the list returned
by this function to the end of values available via
\\<minibuffer-local-map>\\[next-history-element]."
  (delq nil (list (when (use-region-p)
                    (buffer-substring-no-properties
                     (region-beginning) (region-end)))
                  (find-tag-default)
                  (car search-ring)
                  (car (symbol-value query-replace-from-history-variable)))))