Mercurial > emacs
comparison lisp/format.el @ 24315:382a7de604b6
(format-replace-strings): Fix value of TO in REVERSE case.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 14 Feb 1999 06:00:44 +0000 |
parents | e93962ff30b0 |
children | eb03024d18fc |
comparison
equal
deleted
inserted
replaced
24314:96aef9174003 | 24315:382a7de604b6 |
---|---|
423 (save-restriction | 423 (save-restriction |
424 (or beg (setq beg (point-min))) | 424 (or beg (setq beg (point-min))) |
425 (if end (narrow-to-region (point-min) end)) | 425 (if end (narrow-to-region (point-min) end)) |
426 (while alist | 426 (while alist |
427 (let ((from (if reverse (cdr (car alist)) (car (car alist)))) | 427 (let ((from (if reverse (cdr (car alist)) (car (car alist)))) |
428 (to (if reverse (car (cdr alist)) (cdr (car alist))))) | 428 (to (if reverse (car (car alist)) (cdr (car alist))))) |
429 (goto-char beg) | 429 (goto-char beg) |
430 (while (search-forward from nil t) | 430 (while (search-forward from nil t) |
431 (goto-char (match-beginning 0)) | 431 (goto-char (match-beginning 0)) |
432 (insert to) | 432 (insert to) |
433 (set-text-properties (- (point) (length to)) (point) | 433 (set-text-properties (- (point) (length to)) (point) |