emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/pabbrev 6532a9a 2/6: Require with-silent-modifications.


From: Phillip Lord
Subject: [elpa] externals/pabbrev 6532a9a 2/6: Require with-silent-modifications.
Date: Wed, 18 Feb 2015 22:43:48 +0000

branch: externals/pabbrev
commit 6532a9a9cc2e972a9102142e1cac603747f24756
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>

    Require with-silent-modifications.
    
    The with-silent-modifications is better than my macro, and the fallback
    was broken anyway. So I might as well remove it anyway.
---
 pabbrev.el |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/pabbrev.el b/pabbrev.el
index d9dcb5f..d47bbb0 100644
--- a/pabbrev.el
+++ b/pabbrev.el
@@ -474,16 +474,8 @@ I'm not telling you which version, I prefer."
 
 (defmacro pabbrev-save-buffer-modified-p (&rest body)
   "Eval BODY without affected buffer modification status."
-  (if (fboundp 'with-silent-modifications)
-      `(with-silent-modifications ,@body)
-    `(unwind-protect
-         ;; inhibit modification hooks to avoid nasty interaction
-         ;; with linked-buffer.el
-         (let ((inhibit-modification-hooks t)
-               (buffer-modified (buffer-modified-p))
-               (buffer-undo-list t))
-           ,@body)
-       (set-buffer-modified-p buffer-modified))))
+  `(with-silent-modifications
+     ,@body))
 
 (defun pabbrev-get-usage-hash()
   "Return the usage hash for this buffer."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]