>> When killing an emacsclient terminal via C-x C-c, it should prompt to >> save the files initially passed to emacsclient. To see this in action: >> >> $ emacs -Q --daemon >> $ emacsclient -a "" -c foo.txt >> $ emacsclient -a "" -c bar.txt >> >> ;; In the first client frame: >> foobar ;; Insert some text >> C-x C-c >> ;; Emacs prompts "Save file /path/to/foo.txt?..." >> >> Now try the above, but call `(server-stop-automatically 'delete-frame)' >> first (or replace `delete-frame' with `kill-terminal'; it doesn't >> matter). In this case, Emacs doesn't prompt to save the file. However, >> the docstring/comments in `server-save-buffers-kill-terminal' say that >> it should: "Offer to save each buffer, then kill the current client. >> ... Only files from emacsclient file list." > > Gregory, any comments? > This is not a bug, this is the intented behavior of that feature, which was discussed on emacs-devel and in bug#51377. But in commit 997ca88ef44 the word "last" disappeared in the explanation of the meaning of the symbol 'kill-terminal': "when the last frame is being closed" became "when the terminal is killed". Hence the confusion. I attached a patch which preserves the intended behavior of that feature, and adds a fourth possible behavior, the one Jim now wants.