[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/replace.el
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/replace.el |
Date: |
Thu, 01 Jul 2004 06:10:40 -0400 |
Index: emacs/lisp/replace.el
diff -c emacs/lisp/replace.el:1.177 emacs/lisp/replace.el:1.178
*** emacs/lisp/replace.el:1.177 Mon Jun 28 23:03:06 2004
--- emacs/lisp/replace.el Thu Jul 1 09:58:44 2004
***************
*** 38,45 ****
(defcustom query-replace-interactive nil
"Non-nil means `query-replace' uses the last search string.
! That becomes the \"string to replace\"."
! :type 'boolean
:group 'matching)
(defcustom query-replace-from-history-variable 'query-replace-history
--- 38,49 ----
(defcustom query-replace-interactive nil
"Non-nil means `query-replace' uses the last search string.
! That becomes the \"string to replace\".
! If value is `initial', the last search string is inserted into
! the minibuffer as an initial value for \"string to replace\"."
! :type '(choice (const :tag "Off" nil)
! (const :tag "Initial content" initial)
! (other :tag "Use default value" t))
:group 'matching)
(defcustom query-replace-from-history-variable 'query-replace-history
***************
*** 70,85 ****
(unless noerror
(barf-if-buffer-read-only))
(let (from to)
! (if query-replace-interactive
! (setq from (car (if regexp-flag regexp-search-ring search-ring)))
;; 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.
(save-excursion
! (setq from (read-from-minibuffer (format "%s: " string)
! nil nil nil
! query-replace-from-history-variable
! nil t)))
;; Warn if user types \n or \t, but don't reject the input.
(and regexp-flag
(string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from)
--- 74,93 ----
(unless noerror
(barf-if-buffer-read-only))
(let (from to)
! (if (and query-replace-interactive
! (not (eq query-replace-interactive 'initial)))
! (setq from (car (if regexp-flag regexp-search-ring search-ring)))
;; 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.
(save-excursion
! (setq from (read-from-minibuffer
! (format "%s: " string)
! (if (eq query-replace-interactive 'initial)
! (car (if regexp-flag regexp-search-ring search-ring)))
! nil nil
! query-replace-from-history-variable
! nil t)))
;; Warn if user types \n or \t, but don't reject the input.
(and regexp-flag
(string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from)
***************
*** 92,100 ****
(sit-for 2))))
(save-excursion
! (setq to (read-from-minibuffer (format "%s %s with: " string from)
! nil nil nil
! query-replace-to-history-variable from t)))
(when (and regexp-flag
(string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to))
(let (pos list char)
--- 100,109 ----
(sit-for 2))))
(save-excursion
! (setq to (read-from-minibuffer
! (format "%s %s with: " string from)
! nil nil nil
! query-replace-to-history-variable from t)))
(when (and regexp-flag
(string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to))
(let (pos list char)
- [Emacs-diffs] Changes to emacs/lisp/replace.el,
Juri Linkov <=
- [Emacs-diffs] Changes to emacs/lisp/replace.el, Richard M . Stallman, 2004/07/02
- [Emacs-diffs] Changes to emacs/lisp/replace.el, Juri Linkov, 2004/07/03
- [Emacs-diffs] Changes to emacs/lisp/replace.el, Stefan Monnier, 2004/07/05
- [Emacs-diffs] Changes to emacs/lisp/replace.el, Stefan Monnier, 2004/07/05
- [Emacs-diffs] Changes to emacs/lisp/replace.el, Stefan Monnier, 2004/07/05
- [Emacs-diffs] Changes to emacs/lisp/replace.el, Stefan Monnier, 2004/07/06
- [Emacs-diffs] Changes to emacs/lisp/replace.el, Richard M . Stallman, 2004/07/17
- [Emacs-diffs] Changes to emacs/lisp/replace.el, Richard M . Stallman, 2004/07/24