[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6d6c93f: Avoid dynamic binding on a symbol
From: |
Mark Oteiza |
Subject: |
[Emacs-diffs] master 6d6c93f: Avoid dynamic binding on a symbol |
Date: |
Tue, 4 Oct 2016 14:26:46 +0000 (UTC) |
branch: master
commit 6d6c93f4cc02d5c03b2f0ec9e565d61a50677e14
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>
Avoid dynamic binding on a symbol
Instead, bind history in the default minibuffer-history.
Fixes bug#24580.
* lisp/replace.el (query-replace-read-from): Let-bind
minibuffer-history. Change read-regexp and read-from-minibuffer's
HISTORY arguments to nil so that they use minibuffer-history.
---
lisp/replace.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/replace.el b/lisp/replace.el
index 4256751..4fc48d4 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -174,7 +174,7 @@ wants to replace FROM with TO."
(propertize "\0"
'display query-replace-from-to-separator
'separator t)))
- (query-replace-from-to-history
+ (minibuffer-history
(append
(when separator
(mapcar (lambda (from-to)
@@ -186,7 +186,7 @@ wants to replace FROM with TO."
(minibuffer-allow-text-properties t) ; separator uses text-properties
(prompt
(if (and query-replace-defaults separator)
- (format "%s (default %s): " prompt (car
query-replace-from-to-history))
+ (format "%s (default %s): " prompt (car minibuffer-history))
(format "%s: " prompt)))
(from
;; The save-excursion here is in case the user marks and copies
@@ -198,9 +198,9 @@ wants to replace FROM with TO."
(setq-local text-property-default-nonsticky
(cons '(separator . t)
text-property-default-nonsticky)))
(if regexp-flag
- (read-regexp prompt nil 'query-replace-from-to-history)
+ (read-regexp prompt)
(read-from-minibuffer
- prompt nil nil nil 'query-replace-from-to-history
+ prompt nil nil nil nil
(car (if regexp-flag regexp-search-ring search-ring)) t)))))
(to))
(if (and (zerop (length from)) query-replace-defaults)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6d6c93f: Avoid dynamic binding on a symbol,
Mark Oteiza <=