changeset 11621:710b5ce824c2

(jka-compr-insert-file-contents): When visiting, bind buffer-file-name to nil temporarily.
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 Apr 1995 19:25:19 +0000
parents 5e836a7d213d
children eba5c25341ff
files lisp/jka-compr.el
diffstat 1 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/jka-compr.el	Sat Apr 29 16:49:41 1995 +0000
+++ b/lisp/jka-compr.el	Sat Apr 29 19:25:19 1995 +0000
@@ -502,13 +502,18 @@
 							(if (and beg end)
 							    (- end beg)
 							  end))
-			(jka-compr-call-process uncompress-program
-						(concat uncompress-message
-							" " base-name)
-						local-file
-						t
-						nil
-						uncompress-args))
+			;; If visiting, bind off buffer-file-name so that
+			;; file-locking will not ask whether we should
+			;; really edit the buffer.
+			(let ((buffer-file-name
+			       (if visit nil buffer-file-name)))
+			  (jka-compr-call-process uncompress-program
+						  (concat uncompress-message
+							  " " base-name)
+						  local-file
+						  t
+						  nil
+						  uncompress-args)))
 		      (setq size (- (point) start))
 		      (if replace
 			  (let* ((del-beg (point))