1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Improve error messaging when parent archive buffers are missing

* lisp/arc-mode.el (archive-write-file-member):
* lisp/tar-mode.el (tar-subfile-save-buffer): Give a better error
message when the parent buffer is dead (bug#56605).
This commit is contained in:
Lars Ingebrigtsen 2022-07-17 11:16:26 +02:00
parent dbed538391
commit e51850297f
2 changed files with 4 additions and 0 deletions

View file

@ -1329,6 +1329,8 @@ to make your changes permanent."
(error "This buffer has no superior tar file buffer"))
(if (not (and (boundp 'tar-superior-descriptor) tar-superior-descriptor))
(error "This buffer doesn't have an index into its superior tar file!"))
(unless (buffer-live-p tar-superior-buffer)
(error "The tar buffer no longer exists; can't save"))
(let ((subfile (current-buffer))
(coding buffer-file-coding-system)
(descriptor tar-superior-descriptor)