Mercurial > emacs
comparison lisp/arc-mode.el @ 88039:e74ef2442a4a
(archive-extract): Use kill-buffer-if-not-modified as
exit-action when viewing the buffer.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Sun, 27 Jan 2008 22:20:43 +0000 |
parents | 107ccd98fa12 |
children | c70e45a7acfd |
comparison
equal
deleted
inserted
replaced
88038:e75f63aebb2b | 88039:e74ef2442a4a |
---|---|
993 (if archive-read-only | 993 (if archive-read-only |
994 (message "Note: altering this archive is not implemented.")))) | 994 (message "Note: altering this archive is not implemented.")))) |
995 (archive-maybe-update t)) | 995 (archive-maybe-update t)) |
996 (or (not (buffer-name buffer)) | 996 (or (not (buffer-name buffer)) |
997 (cond | 997 (cond |
998 (view-p (view-buffer buffer (and just-created 'kill-buffer))) | 998 (view-p (view-buffer |
999 buffer (and just-created 'kill-buffer-if-not-modified))) | |
999 ((eq other-window-p 'display) (display-buffer buffer)) | 1000 ((eq other-window-p 'display) (display-buffer buffer)) |
1000 (other-window-p (switch-to-buffer-other-window buffer)) | 1001 (other-window-p (switch-to-buffer-other-window buffer)) |
1001 (t (switch-to-buffer buffer)))))) | 1002 (t (switch-to-buffer buffer)))))) |
1002 | 1003 |
1003 (defun archive-*-extract (archive name command) | 1004 (defun archive-*-extract (archive name command) |
1950 (re-search-forward "Rar!") | 1951 (re-search-forward "Rar!") |
1951 (write-region (match-beginning 0) (point-max) tmpfile)))) | 1952 (write-region (match-beginning 0) (point-max) tmpfile)))) |
1952 (archive-rar-extract tmpfile name)) | 1953 (archive-rar-extract tmpfile name)) |
1953 (if tmpbuf (kill-buffer tmpbuf)) | 1954 (if tmpbuf (kill-buffer tmpbuf)) |
1954 (delete-file tmpfile)))) | 1955 (delete-file tmpfile)))) |
1955 | 1956 |
1956 | 1957 |
1957 ;; ------------------------------------------------------------------------- | 1958 ;; ------------------------------------------------------------------------- |
1958 ;; This line was a mistake; it is kept now for compatibility. | 1959 ;; This line was a mistake; it is kept now for compatibility. |
1959 ;; rms 15 Oct 98 | 1960 ;; rms 15 Oct 98 |
1960 | 1961 |