comparison lisp/tar-mode.el @ 21851:facde3a9a846

(tar-mode-write-file): Protect from null tar-header-offset.
author Dave Love <fx@gnu.org>
date Wed, 29 Apr 1998 22:34:42 +0000
parents 96fc2ea42485
children e27e9e844efe
comparison
equal deleted inserted replaced
21850:96fc2ea42485 21851:facde3a9a846
1203 (save-excursion 1203 (save-excursion
1204 (widen) 1204 (widen)
1205 ;; Doing this here confuses things - the region gets left too wide! 1205 ;; Doing this here confuses things - the region gets left too wide!
1206 ;; I suppose this is run in a context where changing the buffer is bad. 1206 ;; I suppose this is run in a context where changing the buffer is bad.
1207 ;; (tar-pad-to-blocksize) 1207 ;; (tar-pad-to-blocksize)
1208 (write-region tar-header-offset (point-max) buffer-file-name nil t) 1208 ;; tar-header-offset turns out to be null for files fetched with W3,
1209 ;; at least.
1210 (write-region (or tar-header-offset (point-min)) (point-max)
1211 buffer-file-name nil t)
1209 (tar-clear-modification-flags) 1212 (tar-clear-modification-flags)
1210 (set-buffer-modified-p nil)) 1213 (set-buffer-modified-p nil))
1211 (narrow-to-region 1 tar-header-offset)) 1214 (narrow-to-region 1 tar-header-offset))
1212 ;; return T because we've written the file. 1215 ;; return T because we've written the file.
1213 t) 1216 t)