> drkm was using code from my emacs-wiki program as an example for this. > You're right in that using a non-nil VISIT argument was a bad idea. > I've also worked around the "prompted to save a temp buffer" problem > by making a macro called `emacs-wiki-with-temp-buffer' as follows. > The condition-case call is mainly used for displaying diagnostic > information, so it might not be generally useful. A part of the > cleanup code,
> (when (buffer-live-p ,temp-buffer) > (with-current-buffer ,temp-buffer > (set-buffer-modified-p nil)) > (... (kill-buffer ,temp-buffer))) A temp buffer's buffer-file-name should be nil. Otherwise, it doesn't deserve the name "temporary". So the above is a bad idea since it will hide bugs like the one where you've set the VISIT arg to non-nil. Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel