[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105571: * lisp/isearch.el (isearch-e
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105571: * lisp/isearch.el (isearch-edit-string): Let-bind `search-ring' and |
Date: |
Thu, 25 Aug 2011 23:32:54 +0300 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105571
fixes bug(s): http://debbugs.gnu.org/9185
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Thu 2011-08-25 23:32:54 +0300
message:
* lisp/isearch.el (isearch-edit-string): Let-bind `search-ring' and
`regexp-search-ring' to their global values to protect from
updating by `read-from-minibuffer'.
modified:
lisp/ChangeLog
lisp/isearch.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-08-25 19:54:07 +0000
+++ b/lisp/ChangeLog 2011-08-25 20:32:54 +0000
@@ -1,5 +1,11 @@
2011-08-25 Juri Linkov <address@hidden>
+ * isearch.el (isearch-edit-string): Let-bind `search-ring' and
+ `regexp-search-ring' to their global values to protect from
+ updating by `read-from-minibuffer' (bug#9185).
+
+2011-08-25 Juri Linkov <address@hidden>
+
* textmodes/ispell.el (ispell-command-loop): Add newline
at the end of the "Use option `i'..." line.
=== modified file 'lisp/isearch.el'
--- a/lisp/isearch.el 2011-08-24 09:40:58 +0000
+++ b/lisp/isearch.el 2011-08-25 20:32:54 +0000
@@ -1132,6 +1132,14 @@
;; Save current configuration so we can restore it here.
(isearch-window-configuration (current-window-configuration))
+ ;; This could protect the index of the search rings,
+ ;; but we can't reliably count the number of typed M-p
+ ;; in `read-from-minibuffer' to adjust the index accordingly.
+ ;; So when the following is commented out, `isearch-mode'
+ ;; below resets the index to the predictable value nil.
+ ;; (search-ring-yank-pointer search-ring-yank-pointer)
+ ;; (regexp-search-ring-yank-pointer
regexp-search-ring-yank-pointer)
+
;; Temporarily restore `minibuffer-message-timeout'.
(minibuffer-message-timeout
isearch-original-minibuffer-message-timeout)
@@ -1152,13 +1160,18 @@
(unwind-protect
(let* ((message-log-max nil)
+ ;; Protect global value of search rings from updating
+ ;; by `read-from-minibuffer'. It should be updated only
+ ;; by `isearch-update-ring' in `isearch-done', not here.
+ (search-ring search-ring)
+ (regexp-search-ring regexp-search-ring)
;; Binding minibuffer-history-symbol to nil is a
work-around
;; for some incompatibility with gmhist.
(minibuffer-history-symbol))
(setq isearch-new-string
(read-from-minibuffer
(isearch-message-prefix nil nil isearch-nonincremental)
- (cons isearch-string (1+ (isearch-fail-pos)))
+ (cons isearch-string (1+ (isearch-fail-pos)))
minibuffer-local-isearch-map nil
(if isearch-regexp
(cons 'regexp-search-ring
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105571: * lisp/isearch.el (isearch-edit-string): Let-bind `search-ring' and,
Juri Linkov <=