After discussing on emacs-devel, here is a complete patch for the feature of applying the entire diff buffer: