Commit 9b1fad33 authored by Chong Yidong's avatar Chong Yidong

* arc-mode.el (archive-extract): Check if an existing buffer name

	comes from a different archive.
parent 179a6f21
2006-03-07 Chong Yidong <cyd@stupidchicken.com>
* arc-mode.el (archive-extract): Check if an existing buffer name
comes from a different archive.
* help.el (describe-key-briefly): If KEY is a down event, read and
discard the up event.
......
......@@ -907,16 +907,18 @@ using `make-temp-file', and the generated name is returned."
(read-only-p (or archive-read-only
view-p
(string-match file-name-invalid-regexp ename)))
(arcfilename (expand-file-name (concat arcname ":" iname)))
(buffer (get-buffer bufname))
(just-created nil))
(if buffer
(if (and buffer
(string= (buffer-file-name buffer) arcfilename))
nil
(setq archive (archive-maybe-copy archive))
(setq bufname (generate-new-buffer-name bufname))
(setq buffer (get-buffer-create bufname))
(setq just-created t)
(with-current-buffer buffer
(setq buffer-file-name
(expand-file-name (concat arcname ":" iname)))
(setq buffer-file-name arcfilename)
(setq buffer-file-truename
(abbreviate-file-name buffer-file-name))
;; Set the default-directory to the dir of the superior buffer.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment