phillord pushed a commit to branch externals/pabbrev in repository elpa. commit 33074a403d90dfe0028f9877ab97c887a62945b2 Author: Phillip Lord <phillip.l...@newcastle.ac.uk> Date: Thu Sep 11 14:54:49 2014 +0100
pabbrev-mode now sets inhibit-modification-hooks This was motivated by a nasty interaction with linked-buffer but should be general. --- pabbrev.el | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pabbrev.el b/pabbrev.el index aa0e24e..6c1e9ce 100644 --- a/pabbrev.el +++ b/pabbrev.el @@ -469,10 +469,16 @@ I'm not telling you which version, I prefer." (defmacro pabbrev-save-buffer-modified-p (&rest body) "Eval BODY without affected buffer modification status" - `(let ((buffer-modified (buffer-modified-p)) - (buffer-undo-list t)) - ,@body - (set-buffer-modified-p buffer-modified))) + `(unwind-protect + (progn + ;; inhibit modification hooks to avoid nasty interaction + ;; with linked-buffer.el + (setq inhibit-modification-hooks t) + (let ((buffer-modified (buffer-modified-p)) + (buffer-undo-list t)) + ,@body + (set-buffer-modified-p buffer-modified))) + (setq inhibit-modification-hooks nil))) (defun pabbrev-get-usage-hash() "Returns the usage hash for this buffer."