Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2bf2b947
Commit
2bf2b947
authored
May 31, 2006
by
Juri Linkov
Browse files
(query-replace-read-from, query-replace-read-to):
Bind `history-add-new-input' to nil. Call `add-to-history'.
parent
8ba7e540
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
lisp/replace.el
lisp/replace.el
+9
-5
No files found.
lisp/replace.el
View file @
2bf2b947
...
...
@@ -99,7 +99,8 @@ The return value can also be a pair (FROM . TO) indicating that the user
wants to replace FROM with TO."
(
if
query-replace-interactive
(
car
(
if
regexp-flag
regexp-search-ring
search-ring
))
(
let
((
from
(
let*
((
history-add-new-input
nil
)
(
from
;; The save-excursion here is in case the user marks and copies
;; a region in order to specify the minibuffer input.
;; That should not clobber the region for the query-replace itself.
...
...
@@ -117,6 +118,7 @@ wants to replace FROM with TO."
(
cons
(
car
query-replace-defaults
)
(
query-replace-compile-replacement
(
cdr
query-replace-defaults
)
regexp-flag
))
(
add-to-history
query-replace-from-history-variable
from
nil
t
)
;; Warn if user types \n or \t, but don't reject the input.
(
and
regexp-flag
(
string-match
"\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)"
from
)
...
...
@@ -174,10 +176,12 @@ the original string if not."
"Query and return the `to' argument of a query-replace operation."
(
query-replace-compile-replacement
(
save-excursion
(
let
((
to
(
read-from-minibuffer
(
format
"%s %s with: "
prompt
(
query-replace-descr
from
))
nil
nil
nil
query-replace-to-history-variable
from
t
)))
(
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
)
(
setq
query-replace-defaults
(
cons
from
to
))
to
))
regexp-flag
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment