]> git.eshelyaron.com Git - emacs.git/commitdiff
Disable undo in the process buffers of a JSONRPC connection
authorJoão Távora <joaotavora@gmail.com>
Wed, 11 Dec 2019 21:26:35 +0000 (22:26 +0100)
committerJoão Távora <joaotavora@gmail.com>
Fri, 13 Dec 2019 16:34:15 +0000 (17:34 +0100)
* lisp/jsonrpc.el (initialize-instance jsonrpc-process-connection):
Use buffer-disable-undo in stdout and stderr buffers.

* lisp/jsonrpc.el (Version): Bump to 1.0.9

lisp/jsonrpc.el

index abab445fe5c25d3f3d5f54c6fb5dbe71b91fb07f..6e0a012d5f808b29638d06e4ece72e2cd9e98822 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: João Távora <joaotavora@gmail.com>
 ;; Keywords: processes, languages, extensions
 ;; Package-Requires: ((emacs "25.2"))
-;; Version: 1.0.8
+;; Version: 1.0.9
 
 ;; This is an Elpa :core package.  Don't use functionality that is not
 ;; compatible with Emacs 25.2.
@@ -374,8 +374,11 @@ connection object, called when the process dies .")
     (set-process-filter proc #'jsonrpc--process-filter)
     (set-process-sentinel proc #'jsonrpc--process-sentinel)
     (with-current-buffer (process-buffer proc)
+      (buffer-disable-undo)
       (set-marker (process-mark proc) (point-min))
       (let ((inhibit-read-only t)) (erase-buffer) (read-only-mode t) proc))
+    (with-current-buffer stderr
+      (buffer-disable-undo))
     (process-put proc 'jsonrpc-connection conn)))
 
 (cl-defmethod jsonrpc-connection-send ((connection jsonrpc-process-connection)