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

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

[elpa] externals/vlf fd9c258 096/310: Use permanent buffer local write h


From: Stefan Monnier
Subject: [elpa] externals/vlf fd9c258 096/310: Use permanent buffer local write hook and update README.
Date: Sat, 28 Nov 2020 00:32:54 -0500 (EST)

branch: externals/vlf
commit fd9c258fc80e1a94498af58b064f596fe2723d23
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>

    Use permanent buffer local write hook and update README.
---
 README.org | 6 ++----
 vlfi.el    | 3 ++-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index 75160e4..034ca4e 100644
--- a/README.org
+++ b/README.org
@@ -49,10 +49,8 @@ example you can directly press digits to enter prefix 
arguments.
 
 ** Changing major mode
 
-You can temporarily change major mode to whatever you like.  Just
-*don't save*!  Turn to *vlfi-edit-mode* first (may need to mark buffer
-as modified if needed).  And you can return to *vlfi-mode* too if you
-haven't changed anything.
+You can temporarily change major mode to whatever you like.  Saving
+will insert contents as intended.  You can return to *vlfi-mode* too.
 
 * Detail usage
 
diff --git a/vlfi.el b/vlfi.el
index e2f3e4b..2fb8ae0 100644
--- a/vlfi.el
+++ b/vlfi.el
@@ -76,7 +76,8 @@
   (setq buffer-read-only t)
   (set-buffer-modified-p nil)
   (buffer-disable-undo)
-  (add-hook 'write-contents-functions 'vlfi-write)
+  (make-local-variable 'write-file-functions)
+  (add-hook 'write-file-functions 'vlfi-write)
   (make-local-variable 'revert-buffer-function)
   (setq revert-buffer-function 'vlfi-revert)
   (make-local-variable 'vlfi-batch-size)



reply via email to

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