# HG changeset patch # User Richard M. Stallman # Date 886203290 0 # Node ID 24a1fcdc31d705c22e480a83ba80ae66e5ec32e0 # Parent 918448e5d2949b39236c466c24e5969471699444 (query-replace-from-history-variable): New variable. (query-replace-to-history-variable): New variable. (query-replace-read-args): Use them. diff -r 918448e5d294 -r 24a1fcdc31d7 lisp/replace.el --- a/lisp/replace.el Fri Jan 30 17:49:37 1998 +0000 +++ b/lisp/replace.el Fri Jan 30 23:34:50 1998 +0000 @@ -37,16 +37,33 @@ "Non-nil means `query-replace' uses the last search string. That becomes the \"string to replace\".") +(defcustom query-replace-from-history-variable 'query-replace-history + "History list to use for the FROM argument of query-replace commands. +The value of this variable should be a symbol; that symbol +is used as a variable to hold a history list for the strings +or patterns to be replaced." + :group 'matching + :type 'symbol) + +(defcustom query-replace-to-history-variable 'query-replace-history + "History list to use for the TO argument of query-replace commands. +The value of this variable should be a symbol; that symbol +is used as a variable to hold a history list for replacement +strings or patterns." + :group 'matching + :type 'symbol) + (defun query-replace-read-args (string regexp-flag) (let (from to) (if query-replace-interactive (setq from (car (if regexp-flag regexp-search-ring search-ring))) (setq from (read-from-minibuffer (format "%s: " string) nil nil nil - 'query-replace-history nil t))) + query-replace-from-history-variable + nil t))) (setq to (read-from-minibuffer (format "%s %s with: " string from) nil nil nil - 'query-replace-history nil t)) + query-replace-to-history-variable nil t)) (list from to current-prefix-arg))) (defun query-replace (from-string to-string &optional arg)