[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/detached 09a7aeb7ec 2/2: Replace buffer-read-only with
From: |
ELPA Syncer |
Subject: |
[elpa] externals/detached 09a7aeb7ec 2/2: Replace buffer-read-only with inhibit-read-only |
Date: |
Wed, 25 May 2022 11:57:29 -0400 (EDT) |
branch: externals/detached
commit 09a7aeb7ec679fe4260b2f5010d186563c527245
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Replace buffer-read-only with inhibit-read-only
---
detached-compile.el | 2 +-
detached.el | 29 +++++++++++++++--------------
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/detached-compile.el b/detached-compile.el
index bc8ca0b1b7..ef1264c150 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -124,7 +124,7 @@ Optionally EDIT-COMMAND."
"Replace the modsetter inserted by `compilation-start'."
(save-excursion
(let ((kill-ring nil)
- (buffer-read-only nil)
+ (inhibit-read-only t)
(regexp (rx (regexp "^dtach ") (or "-c" "-a") (regexp
".*\.socket.*$"))))
(goto-char (point-min))
(when (re-search-forward regexp nil t)
diff --git a/detached.el b/detached.el
index 1598c5578c..373efc52cf 100644
--- a/detached.el
+++ b/detached.el
@@ -354,16 +354,17 @@ The session is compiled by opening its output and enabling
(tramp-verbose 1))
(when (file-exists-p file)
(with-current-buffer (get-buffer-create buffer-name)
- (setq-local buffer-read-only nil)
- (erase-buffer)
- (insert (detached--session-output session))
- (setq-local default-directory
- (detached--session-working-directory session))
- (run-hooks 'detached-compile-session-hooks)
- (detached-log-mode)
- (compilation-minor-mode)
- (setq detached--buffer-session session)
- (setq-local font-lock-defaults '(compilation-mode-font-lock-keywords
t))
+ (let ((inhibit-read-only t))
+ (setq-local buffer-read-only nil)
+ (erase-buffer)
+ (insert (detached--session-output session))
+ (setq-local default-directory
+ (detached--session-working-directory session))
+ (run-hooks 'detached-compile-session-hooks)
+ (detached-log-mode)
+ (compilation-minor-mode)
+ (setq detached--buffer-session session)
+ (setq-local font-lock-defaults
'(compilation-mode-font-lock-keywords t)))
(font-lock-mode)
(read-only-mode))
(pop-to-buffer buffer-name)))))
@@ -465,10 +466,10 @@ Optionally DELETE the session if prefix-argument is
provided."
(if (file-exists-p file-path)
(progn
(with-current-buffer (get-buffer-create buffer-name)
- (setq-local buffer-read-only nil)
- (erase-buffer)
- (insert (detached--session-output session))
- (setq-local default-directory
(detached--session-working-directory session))
+ (let ((inhibit-read-only t))
+ (erase-buffer)
+ (insert (detached--session-output session))
+ (setq-local default-directory
(detached--session-working-directory session)))
(detached-log-mode)
(setq detached--buffer-session session)
(goto-char (point-max)))