From: Francois Fleuret Date: Fri, 1 Feb 2013 21:41:55 +0000 (+0100) Subject: Do not attempt at expunging read-only buffers automatically on quit. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=2d1ba5da3dee7cadaf9e736a8c476a9562a1d67a;p=elisp.git Do not attempt at expunging read-only buffers automatically on quit. --- diff --git a/vm b/vm index f863e60..f2019a4 100644 --- a/vm +++ b/vm @@ -286,7 +286,10 @@ attachement from mail." (vm-delete-message 1) (condition-case nil (vm-next-message-no-skip 1) (error nil))) -(add-hook 'vm-quit-hook 'vm-expunge-folder) +(defun ff/vm-expunge-folder () + (unless vm-folder-read-only (vm-expunge-folder))) + +(add-hook 'vm-quit-hook 'ff/vm-expunge-folder) (add-hook 'vm-quit-hook 'bbdb-save-db) (add-hook 'vm-retrieved-spooled-mail-hook 'display-time-update)