]> git.eshelyaron.com Git - emacs.git/commitdiff
(jka-compr-insert-file-contents): When visiting,
authorRichard M. Stallman <rms@gnu.org>
Sat, 29 Apr 1995 19:25:19 +0000 (19:25 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 29 Apr 1995 19:25:19 +0000 (19:25 +0000)
bind buffer-file-name to nil temporarily.

lisp/jka-compr.el

index 5c139c865dd766a7204a60e3ea339dcbb9271edc..e5975037ffe00d626519cf2353a757501954a010 100644 (file)
@@ -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))