[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 4c49452cdef 2/2: (treesit-query-validate): Fix reusing the outp
From: |
Dmitry Gutov |
Subject: |
emacs-29 4c49452cdef 2/2: (treesit-query-validate): Fix reusing the output buffer |
Date: |
Sat, 18 Feb 2023 16:53:37 -0500 (EST) |
branch: emacs-29
commit 4c49452cdef9721715838590aff175ef596a08b2
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
(treesit-query-validate): Fix reusing the output buffer
* lisp/treesit.el (treesit-query-validate): Fix the "Buffer is
read-only" error when an output buffer already exists.
---
lisp/treesit.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 09531b838a1..b71b5b486d5 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -2380,7 +2380,8 @@ to the offending pattern and highlight the pattern."
(with-current-buffer buf
(let* ((data (cdr err))
(message (nth 0 data))
- (start (nth 1 data)))
+ (start (nth 1 data))
+ (inhibit-read-only t))
(erase-buffer)
(insert (treesit-query-expand query))
(goto-char start)