Mercurial > emacs
comparison lisp/replace.el @ 89953:029a652ac817
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-23
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-442
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-444
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-445
Tweak permissions
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-446
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-450
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 11 Jul 2004 22:08:06 +0000 |
parents | 6f6e9fe4658b a9b695d281d4 |
children | b9eee0a7bef5 |
comparison
equal
deleted
inserted
replaced
89952:6f6e9fe4658b | 89953:029a652ac817 |
---|---|
285 | 285 |
286 Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace | 286 Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace |
287 only matches that are surrounded by word boundaries. | 287 only matches that are surrounded by word boundaries. |
288 Fourth and fifth arg START and END specify the region to operate on." | 288 Fourth and fifth arg START and END specify the region to operate on." |
289 (interactive | 289 (interactive |
290 (progn | |
290 (barf-if-buffer-read-only) | 291 (barf-if-buffer-read-only) |
291 (let* ((from | 292 (let* ((from |
292 ;; Let-bind the history var to disable the "foo -> bar" default. | 293 ;; Let-bind the history var to disable the "foo -> bar" default. |
293 ;; Maybe we shouldn't disable this default, but for now I'll | 294 ;; Maybe we shouldn't disable this default, but for now I'll |
294 ;; leave it off. --Stef | 295 ;; leave it off. --Stef |
303 (replace-match-string-symbols to) | 304 (replace-match-string-symbols to) |
304 (list from (car to) current-prefix-arg | 305 (list from (car to) current-prefix-arg |
305 (if (and transient-mark-mode mark-active) | 306 (if (and transient-mark-mode mark-active) |
306 (region-beginning)) | 307 (region-beginning)) |
307 (if (and transient-mark-mode mark-active) | 308 (if (and transient-mark-mode mark-active) |
308 (region-end))))) | 309 (region-end)))))) |
309 (perform-replace regexp (cons 'replace-eval-replacement to-expr) | 310 (perform-replace regexp (cons 'replace-eval-replacement to-expr) |
310 t 'literal delimited nil nil start end)) | 311 t 'literal delimited nil nil start end)) |
311 | 312 |
312 (defun map-query-replace-regexp (regexp to-strings &optional n start end) | 313 (defun map-query-replace-regexp (regexp to-strings &optional n start end) |
313 "Replace some matches for REGEXP with various strings, in rotation. | 314 "Replace some matches for REGEXP with various strings, in rotation. |