Mercurial > emacs
diff lisp/replace.el @ 90072:cb67264d6096
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-2
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-83
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-84
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-3
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-4
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-5
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-6
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-11
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-12
Remove "-face" suffix from lazy-highlight face name
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-13
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-16
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-17
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-18
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-21
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-22
<no summary provided>
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-23
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-39
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-40
Fix regressions from latest reftex update
* miles@gnu.org--gnu-2005/gnus--rel--5.10--base-0
tag of miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-82
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-1
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-2
Merge from miles@gnu.org--gnu-2004
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-3
Merge from emacs--cvs-trunk--0
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 16 Jan 2005 03:40:12 +0000 |
parents | f6b4d0ebf147 3d6f4d8e0b8b |
children | 3ebd9bdb4fe5 |
line wrap: on
line diff
--- a/lisp/replace.el Sun Jan 02 09:21:32 2005 +0000 +++ b/lisp/replace.el Sun Jan 16 03:40:12 2005 +0000 @@ -64,6 +64,27 @@ :group 'matching :version "21.4") +(defcustom query-replace-highlight t + "*Non-nil means to highlight matches during query replacement." + :type 'boolean + :group 'matching) + +(defcustom query-replace-lazy-highlight t + "*Controls the lazy-highlighting during query replacements. +When non-nil, all text in the buffer matching the current match +is highlighted lazily using isearch lazy highlighting (see +`lazy-highlight-initial-delay' and `lazy-highlight-interval')." + :type 'boolean + :group 'lazy-highlight + :group 'matching + :version "21.4") + +(defface query-replace + '((t (:inherit isearch))) + "Face for highlighting query replacement matches." + :group 'matching + :version "21.4") + (defun query-replace-descr (string) (mapconcat 'isearch-text-char-description string "")) @@ -802,9 +823,10 @@ (setq count (+ count (if forwardp -1 1))) (setq beg (line-beginning-position) end (line-end-position)) - (if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode + (if (and keep-props (if (boundp 'jit-lock-mode) jit-lock-mode) (text-property-not-all beg end 'fontified t)) - (jit-lock-fontify-now beg end)) + (if (fboundp 'jit-lock-fontify-now) + (jit-lock-fontify-now beg end))) (push (funcall (if keep-props #'buffer-substring @@ -1008,9 +1030,11 @@ endpt (line-end-position))) (setq marker (make-marker)) (set-marker marker matchbeg) - (if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode + (if (and keep-props + (if (boundp 'jit-lock-mode) jit-lock-mode) (text-property-not-all begpt endpt 'fontified t)) - (jit-lock-fontify-now begpt endpt)) + (if (fboundp 'jit-lock-fontify-now) + (jit-lock-fontify-now begpt endpt))) (setq curstring (buffer-substring begpt endpt)) ;; Depropertize the string, and maybe ;; highlight the matches @@ -1258,27 +1282,6 @@ (replace-match newtext fixedcase literal) noedit) -(defcustom query-replace-highlight t - "*Non-nil means to highlight matches during query replacement." - :type 'boolean - :group 'matching) - -(defcustom query-replace-lazy-highlight t - "*Controls the lazy-highlighting during query replacements. -When non-nil, all text in the buffer matching the current match -is highlighted lazily using isearch lazy highlighting (see -`isearch-lazy-highlight-initial-delay' and -`isearch-lazy-highlight-interval')." - :type 'boolean - :group 'matching - :version "21.4") - -(defface query-replace - '((t (:inherit isearch))) - "Face for highlighting query replacement matches." - :group 'matching - :version "21.4") - (defun perform-replace (from-string replacements query-flag regexp-flag delimited-flag &optional repeat-count map start end)