summaryrefslogtreecommitdiff
path: root/lisp/jka-compr.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-04-29 19:25:19 +0000
committerRichard M. Stallman <rms@gnu.org>1995-04-29 19:25:19 +0000
commit135381643b068fec194b803a6318785bec71dc9c (patch)
tree19b5675a7900fc6631b39015d83308b144a88c28 /lisp/jka-compr.el
parent94c9852c231e25e3f2404f1c725ca3bbf66a951b (diff)
downloademacs-135381643b068fec194b803a6318785bec71dc9c.tar.gz
(jka-compr-insert-file-contents): When visiting,
bind buffer-file-name to nil temporarily.
Diffstat (limited to 'lisp/jka-compr.el')
-rw-r--r--lisp/jka-compr.el19
1 files changed, 12 insertions, 7 deletions
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index 5c139c865dd..e5975037ffe 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -502,13 +502,18 @@ There should be no more than seven characters after the final `/'")
(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))