[gnu.emacs.bug] 18.52 uncompress has problem with read-only files

sven@tde.lth.se (Sven Mattisson) (09/26/88)

Uncompress-while-visiting in uncompress.el does not uncompress write
protected files properly.  The following diff fixes the problem.

*** uncompress.el.18.52	Sun Sep 25 21:20:03 1988
--- uncompress.el	Sun Sep 25 21:20:38 1988
***************
*** 6,12
        (set-visited-file-name
         (substring buffer-file-name 0 (match-beginning 0))))
    (message "Uncompressing...")
!   (shell-command-on-region (point-min) (point-max) "uncompress" t)
    (message "Uncompressing...done")
    (set-buffer-modified-p nil)
    (normal-mode))

--- 6,13 -----
        (set-visited-file-name
         (substring buffer-file-name 0 (match-beginning 0))))
    (message "Uncompressing...")
!   (let ((buffer-read-only nil))
!     (shell-command-on-region (point-min) (point-max) "uncompress" t))
    (message "Uncompressing...done")
    (set-buffer-modified-p nil)
    (normal-mode))
------------------------------------------------------------------------

Sven Mattisson				sven@tde.lth.se
Department of Applied Electronics
University of Lund
Lund, Sweden