Function: replace-preview-both

replace-preview-both is a byte-compiled function defined in replace.el.gz.

Signature

(replace-preview-both MATCH REPLACEMENT)

Documentation

Return MATCH and REPLACEMENT side by side, separated by an arrow.

MATCH and REPLACEMENT are strings, shown in the faces query-replace-preview-match and query-replace-preview.

This function is what query-replace-show-preview uses when it is both.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/replace.el.gz
(defun replace-preview-both (match replacement)
  "Return MATCH and REPLACEMENT side by side, separated by an arrow.
MATCH and REPLACEMENT are strings, shown in the faces
`query-replace-preview-match' and `query-replace-preview'.

This function is what `query-replace-show-preview' uses when it is
`both'."
  (let ((sep (if (char-displayable-p ?→) "→" "->")))
    (concat (replace-preview-propertize (concat match sep)
                                        'query-replace-preview-match)
            (replace-preview-propertize replacement
                                        'query-replace-preview))))