I often work with buffers that have auto-save
enabled.
I can install in kill-buffer-hook
a function that identifies such buffers, and invokes do-auto-save
, thereby automatically saving any lingering modifications to the buffer before the latter is removed.
Unfortunately, doing this does not prevent the prompt
Buffer ... modified; kill anyway? (y or n)
It appears that such a prompt gets triggered before the functions in kill-buffer-hook
get run.
Is there a persistent way to disable such prompt for specific buffers?
(I stress the issue of persistency, to rule out any method that would require that the disabling be refreshed every time the buffer gets modified.)