Fixed bug#19576: `write-file' saves wrong buffer.
If a function on the hook `window-size-change-functions' doesn't restore the current buffer, functions that save and restore the current window configuration (like `y-or-no-p') could silently change the current buffer. When `write-file' asked the user confirmation to overwrite a file, `y-or-no-p' changed the current buffer, and the wrong buffer was saved to the file. * lisp/follow.el (follow-windows-start-end): Call `select-frame' using the `norecord' parameter. (follow-window-size-change): Restore current buffer. Call `select-frame' using the `norecord' parameter. Cleanup.
Showing with 26 additions and 29 deletions