1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
Commit Graph

209 Commits

Author SHA1 Message Date
Juanma Barranquero
3981e5b5f5 Replace read-input' by read-string'. 2005-05-18 10:17:18 +00:00
Eli Zaretskii
06df7f877b (occur-1): Bind inhibit-read-only so that erase-buffer doesn't barf
on read-only text properties (likewise for add-text-properties in
occur-engine).  Mark buffer as unmodified.
(occur-engine): Don't set buffer-read-only here.
2005-05-07 13:46:42 +00:00
Juri Linkov
444697a17a (perform-replace): Remove bindings of global
variables isearch-string, isearch-regexp, isearch-case-fold-search.
Add three new arguments to `replace-highlight'.
(replace-highlight): Add arguments string, regexp, case-fold.
Let-bind isearch-string, isearch-regexp, isearch-case-fold-search
to allow isearch-lazy-highlight-new-loop to use these values
to set corresponding isearch-lazy-highlight-... internal
variables whose values lazy highlighting will use regardless of
changes to global variables isearch-string, isearch-regexp,
isearch-case-fold-search during lazy highlighting loop.
(replace-dehighlight): Rename `isearch-lazy-highlight-cleanup'
to `lazy-highlight-cleanup'.
2005-03-18 09:59:45 +00:00
Lute Kamstra
a0b497c53b (query-replace-read-from): Fix 2005-02-19 change. 2005-02-25 11:45:05 +00:00
Dan Nicolaescu
f79bdb3aa2 (query-replace, query-replace-regexp)
(replace-string, replace-regexp): When operating on region, make
the minibuffer prompt say so.
2005-02-19 21:08:43 +00:00
Eli Zaretskii
2511035dc7 (query-replace-read-from): Set the value of
query-replace-from-history-variable to handle the case of an empty
string entered to accept the suggested default.
2005-02-19 13:12:21 +00:00
Richard M. Stallman
d532160fb0 (perform-replace): Pass new args to replace-highlight.
(replace-highlight): Take region args,
and pass them to isearch-lazy-highlight-new-loop.
2005-02-16 09:49:45 +00:00
Kim F. Storm
bf247b6ed0 Change release version from 21.4 to 22.1 throughout.
Change development version from 21.3.50 to 22.0.50.
2005-02-09 15:50:47 +00:00
Richard M. Stallman
9976909669 (occur-accumulate-lines, occur-engine): Avoid warnings. 2005-01-15 18:10:59 +00:00
Juri Linkov
afd33362f4 (query-replace-lazy-highlight): Add lazy-highlight group.
(query-replace-highlight, query-replace-lazy-highlight)
(query-replace): Move definitions to the beginning of the file.
2005-01-11 23:05:16 +00:00
Richard M. Stallman
1766dac37f (query-replace-lazy-highlight): Doc fix.
These were installed in the previous revision:
(replace-dehighlight): Use lazy-highlight-cleanup.
(query-replace-highlight, query-replace-lazy-highlight)
(query-replace): Definitions moved up.
2005-01-04 02:27:16 +00:00
Richard M. Stallman
f42a241b8e (occur-1): If the output buffer is also an input, don't kill it, rename it. 2005-01-01 22:29:54 +00:00
Juri Linkov
2c13e47b06 (occur-accumulate-lines, occur-engine):
Make forcing deferred font-lock fontification jit-specific.
2004-12-17 16:58:54 +00:00
Juri Linkov
f1f007dc5b (occur-accumulate-lines, occur-engine):
Fontify unfontified matching lines in the source buffer
before copying them.
(occur-engine): Don't put mouse-face on context lines.
(occur-next-error): Set point to line beginning/end
before searching for prev/next property to skip multiple
matches on a line (not supported by occur engine).
Remove redundant prefix-numeric-value.
2004-12-16 13:17:32 +00:00
Juri Linkov
aaaecfcda1 (match): New face.
(list-matching-lines-face): Change default from `bold' to `match'.
2004-12-16 07:16:17 +00:00
Juri Linkov
ccec9764dc (perform-replace): Add isearch-case-fold-search.
Use delimited-flag for isearch-regexp.
Reset isearch-lazy-highlight-last-string to force lazy
highlighting when called from isearch mode.
(query-replace-highlight): Revert defcustom type to boolean.
(query-replace-lazy-highlight): New defcustom.
(query-replace): New face.
(perform-replace, replace-highlight, replace-dehighlight):
Test query-replace-lazy-highlight instead of special value
`isearch' of query-replace-highlight.
(replace-dehighlight): Don't call isearch-dehighlight.
(replace-highlight): Don't call isearch-highlight.
Use face `query-replace' unconditionally.
2004-12-15 10:10:54 +00:00
Juri Linkov
35d59c0f52 * replace.el (query-replace-highlight): Add new value `isearch'
that allows query replacement to use isearch highlighting.
Change type from `boolean' to `choice'.  Doc fix.
(replace-highlight, replace-dehighlight, perform-replace):
Use isearch highlighting if query-replace-highlight eq `isearch'.
2004-12-12 22:33:28 +00:00
Juri Linkov
15fd7d5da5 (replace-match-maybe-edit): Doc fix.
(perform-replace): Don't call `replace-highlight' when automatic
replacement is requested in literal mode, since it is intended
only to highlight words during entering a new replacement string
for \? in non-literal mode.
2004-12-12 22:06:30 +00:00
Richard M. Stallman
2f4e3f7ac5 (occur-1): Specify t for KEEP-PROPS to occur-engine.
(occur-engine): Use `face' prop rather than `font-lock-face'
when specifying use of `match-face'.
(occur-accumulate-lines): Change arg from NO-PROPS to KEEP-PROPS.
2004-12-03 00:19:52 +00:00
Teodor Zlatanov
5f9e0ca5da simple.el (next-error-buffer-p): allow for inclusive and
exclusive tests for finding a buffer
(next-error-find-buffer): pass the exclusive and inclusive tests
to next-error-buffer-p

replace.el (occur-next-error): switch to the Occur buffer when
appropriate, and use the exclusive filter to
next-error-find-buffer to do it.  Use the absolute value of the
motion amount.
2004-11-29 18:44:29 +00:00
Richard M. Stallman
bbe9f1755c (query-replace-read-to, query-replace-read-from):
Specify t for KEEP-ALL in read-from-minibuffer.
2004-11-20 22:09:50 +00:00
Juri Linkov
b938735a66 (perform-replace): Use `query-replace-descr'.
(occur-mode-map): Rename `next-error-follow-mode' to `next-error-follow-minor-mode'.
2004-09-08 20:24:12 +00:00
Eli Zaretskii
0ad1044791 (occur-mode-map): Bind toggle-next-error-follow-mode. 2004-09-04 12:50:17 +00:00
David Kastrup
78629844c6 (query-replace-read-from): Use
`query-replace-compile-replacement'.
(query-replace-compile-replacement): New function.
(query-replace-read-to): Use `query-replace-compile-replacement'
for repeating the last command.
2004-08-01 12:59:09 +00:00
Richard M. Stallman
f22a74063c (occur-next-error): Call set-window-point.
(occur-engine): Handle negative NLINES.
2004-07-24 21:34:47 +00:00
Richard M. Stallman
442a68c7f1 (occur-read-primary-args): Pass default to read-from-minibuffer. 2004-07-17 14:34:42 +00:00
Stefan Monnier
cc0aea1a20 (query-replace-regexp-eval): Fix last change. 2004-07-06 12:31:24 +00:00
Stefan Monnier
6f1df6d9d6 (query-replace-descr): New fun.
(query-replace-read-from, query-replace-read-args): Default to the last from&to.
(query-replace-read-to): Quote the `from' string when displaying it.
(query-replace-regexp-eval): Immediately check read-only status.
Use query-replace-read-from to get the \n checking.
Quote the `from' string when displaying it.
(map-query-replace-regexp, occur-read-primary-args):
Quote the `from' string when displaying it.
2004-07-06 00:06:05 +00:00
Stefan Monnier
1606466a39 (query-replace-read-from, query-replace-read-to): New funs extracted
from query-replace-read-args.
(query-replace-read-args): Use them.
2004-07-05 23:12:28 +00:00
Stefan Monnier
5291cbca50 (query-replace-interactive, query-replace-read-args):
Remove the `initial' special value.
(query-replace-regexp-eval, map-query-replace-regexp): Simplify.
(occur-engine): Remove unused var `matchend'.
2004-07-05 22:50:46 +00:00
Juri Linkov
f1f6079c82 (query-replace-read-args): Swallow space after 'foo,
not after (quote foo).  Match space only immediately after symbol,
not anywhere in the whole string.
2004-07-03 05:18:38 +00:00
Richard M. Stallman
9e5d1b634e (query-replace-read-args): Swallow space after symbols, not after
closeparens.  But avoid error if string ends there.
2004-07-02 23:52:14 +00:00
Juri Linkov
0ec4febda2 (query-replace-interactive): Change type from boolean
to choice.  Add value `initial'.
(query-replace-read-args): Handle value `initial' of
query-replace-interactive.
2004-07-01 10:01:32 +00:00
Juri Linkov
da6eb51ce4 (query-replace-read-args): Swallow a space after
everything except )]" which in most cases means after a symbol.
2004-06-28 23:03:06 +00:00
David Kastrup
cb05ca25df (perform-replace): Highlight the match even in
non-query mode if there is potential replace string editing.
2004-06-26 18:35:18 +00:00
Richard M. Stallman
ba8d15f972 (query-replace-read-args): Swallow space after \,SYMBOL. 2004-06-24 23:33:59 +00:00
David Kastrup
7c1c02ac6e (query-replace-read-args): Implement \,' and \#'
replacements here.
(query-replace-regexp): Doc string explaining this and the new
`\?' replacement.  Remove `\,' and `\#' implementation here, as it
is better placed in `query-replace-read-args'.
(replace-regexp): Explain `\,', `\#' and `\?'.
(replace-match-data): New function for thorough reuse/destruction
of old match-data.
(replace-match-maybe-edit): Function for implementing `\?'
editing.
(perform-replace): Fix maintaining of the match stack including
already matched regions, implement `\?', fix various problems
with regions while editing and other stuff.
(replace-highlight): Simplified.
2004-06-24 10:26:24 +00:00
David Kastrup
2f57bf8593 (query-replace-read-args): Only warn about use of \n
and \t when we are doing a regexp replacement and the actual
escaped character is n or t.
(query-replace-regexp): Add \, and \# interpretation to
interactive call and document it.
(query-replace-regexp-eval, replace-match-string-symbols): add \#
as shortkey for replace-count.
(replace-quote): New function for doubling backslashes.
2004-06-17 14:44:02 +00:00
Juri Linkov
22a76778db (perform-replace): Use `limit' to terminate the while-loop explicitly. 2004-06-10 04:21:14 +00:00
Luc Teirlinck
1f3ade4f4d (query-replace-interactive): Convert defvar into defcustom. 2004-05-30 21:50:35 +00:00
Kim F. Storm
423e4de7c1 From: Teodor Zlatanov <tzz@lifelogs.com>
(occur-next-error, occur-1): Hook into the next-error framework.
2004-04-21 21:36:42 +00:00
John Paul Wallington
dbed3cd3c0 * replace.el (occur-engine): Distinguish between one and several
matches in the matches per buffer heading.
2004-04-11 04:57:44 +00:00
Richard M. Stallman
74ce1b11e9 (occur-engine): Change message for count of matches. 2004-03-12 10:11:16 +00:00
David Kastrup
d83a97ab5f (perform-replace): Allow 'literal argument in
regexp-flag to indicate literal replacement.
(query-replace-regexp-eval): Use it.
2004-02-02 12:50:49 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Richard M. Stallman
2f2f7e58d4 (query-replace-read-args): Use save-excursion.
(map-query-replace-regexp): Use prefix-numeric-value.
2003-03-05 20:51:33 +00:00
Richard M. Stallman
10784bace4 (query-replace-read-args): Return just 3 values.
(query-replace, query-replace-regexp)
(query-replace-regexp-eval, map-query-replace-regexp)
(replace-string, replace-regexp): Read the start and end args
separately so that the expressions are recorded in command-history.
2003-02-24 16:45:47 +00:00
Juanma Barranquero
f1180544bb Trailing whitespace deleted. 2003-02-04 12:29:42 +00:00
Kenichi Handa
5cb4031d8f (occur-engine): Set buffer-file-coding-system of
OUT-BUF to that of one of BUFFERS if they locally bind that
variable.
2002-11-13 07:06:07 +00:00
Richard M. Stallman
446d9629b9 (query-replace, query-replace-regexp): Doc fixes. 2002-11-06 05:08:16 +00:00