+2014-12-15 Juri Linkov <juri@linkov.net>
+
+ * replace.el (query-replace-read-from): Use query-replace-compile-replacement
+ only on the return value (bug#19383).
+
2014-12-15 Juri Linkov <juri@linkov.net>
* isearch.el (isearch-lazy-highlight-search): Extend the bound of
(defcustom query-replace-from-to-separator
(propertize
(or (ignore-errors
+ ;; Ignore errors when attempt to autoload char-displayable-p
+ ;; fails while preparing to dump.
(if (char-displayable-p ?\u2192) " \u2192 " " -> "))
" -> ")
'face 'minibuffer-prompt)
wants to replace FROM with TO."
(if query-replace-interactive
(car (if regexp-flag regexp-search-ring search-ring))
+ ;; Reevaluating will check char-displayable-p that is
+ ;; unavailable while preparing to dump.
(custom-reevaluate-setting 'query-replace-from-to-separator)
(let* ((history-add-new-input nil)
(separator
(cdar query-replace-defaults) regexp-flag))
(let* ((to (if (and (string-match separator from)
(get-text-property (match-beginning 0) 'separator from))
- (query-replace-compile-replacement
- (substring-no-properties from (match-end 0)) regexp-flag)))
+ (substring-no-properties from (match-end 0))))
(from (if to (substring-no-properties from 0 (match-beginning 0))
(substring-no-properties from))))
(add-to-history query-replace-from-history-variable from nil t)
from
(add-to-history query-replace-to-history-variable to nil t)
(add-to-history 'query-replace-defaults (cons from to) nil t)
- (cons from to)))))))
+ (cons from (query-replace-compile-replacement to regexp-flag))))))))
(defun query-replace-compile-replacement (to regexp-flag)
"Maybe convert a regexp replacement TO to Lisp.