Mercurial > emacs
comparison lisp/jka-compr.el @ 51284:55a88703765d
(jka-compr-insert-file-contents):
When REPLACE, delete the proper range of text.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 28 May 2003 11:21:36 +0000 |
parents | e88404e8f2cf |
children | 695cf19ef79e |
comparison
equal
deleted
inserted
replaced
51283:956ab3f2a864 | 51284:55a88703765d |
---|---|
571 t | 571 t |
572 nil | 572 nil |
573 uncompress-args))) | 573 uncompress-args))) |
574 (setq size (- (point) start)) | 574 (setq size (- (point) start)) |
575 (if replace | 575 (if replace |
576 (let* ((del-beg (point)) | 576 (delete-region (point) (point-max))) |
577 (del-end (+ del-beg size))) | |
578 (delete-region del-beg | |
579 (min del-end (point-max))))) | |
580 (goto-char start)) | 577 (goto-char start)) |
581 (error | 578 (error |
582 (if (and (eq (car error-code) 'file-error) | 579 (if (and (eq (car error-code) 'file-error) |
583 (eq (nth 3 error-code) local-file)) | 580 (eq (nth 3 error-code) local-file)) |
584 (if visit | 581 (if visit |