[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu defab30: Make corfu buffer read only to prevent a
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu defab30: Make corfu buffer read only to prevent accidential modifications |
Date: |
Sun, 11 Jul 2021 01:57:08 -0400 (EDT) |
branch: externals/corfu
commit defab3067527276b81e2e9ac67f81c430e092f8c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Make corfu buffer read only to prevent accidential modifications
---
corfu.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/corfu.el b/corfu.el
index e50512d..085dad1 100644
--- a/corfu.el
+++ b/corfu.el
@@ -239,7 +239,8 @@ filter string with spaces is allowed."
(right-fringe-width . nil)
(left-margin-width . 0)
(right-margin-width . 0)
- (fringes-outside-margins . 0))
+ (fringes-outside-margins . 0)
+ (buffer-read-only . t))
"Default child frame buffer parameters.")
;; Function adapted from posframe.el by tumashu
@@ -275,7 +276,8 @@ filter string with spaces is allowed."
(dolist (var corfu--buffer-parameters)
(set (make-local-variable (car var)) (cdr var)))
(setq-local face-remapping-alist fr)
- (let ((inhibit-modification-hooks t))
+ (let ((inhibit-modification-hooks t)
+ (inhibit-read-only t))
(erase-buffer)
(insert content)
(goto-char (point-min))))
@@ -343,7 +345,8 @@ filter string with spaces is allowed."
(when (frame-live-p corfu--frame)
(make-frame-invisible corfu--frame)
(with-current-buffer (window-buffer (frame-root-window corfu--frame))
- (erase-buffer)))
+ (let ((inhibit-read-only t))
+ (erase-buffer))))
(remove-hook 'window-configuration-change-hook #'corfu--popup-hide))
(defun corfu--move-to-front (elem list)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/corfu defab30: Make corfu buffer read only to prevent accidential modifications,
ELPA Syncer <=