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

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

[elpa] externals/substitute d7dcd3b1ae: Do not try to perform substituti


From: ELPA Syncer
Subject: [elpa] externals/substitute d7dcd3b1ae: Do not try to perform substitution in read-only buffers
Date: Tue, 21 Mar 2023 01:59:49 -0400 (EDT)

branch: externals/substitute
commit d7dcd3b1ae4d910ce5d698f5bc09fa8b9a638398
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Do not try to perform substitution in read-only buffers
    
    Thanks to ersi-dnd for bringing this matter to my attention.  This was
    done in issue 6 on the GitHub mirror:
    <https://github.com/protesilaos/substitute/issues/6>.
---
 README.org    | 2 +-
 substitute.el | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index e6fa0aedc8..066ae52af0 100644
--- a/README.org
+++ b/README.org
@@ -224,7 +224,7 @@ matters.
 + Contributions to code or the manual :: Ed Tavinor, Kostas Andreadis,
   Wang Chunye.
 
-+ Ideas and/or user feedback :: Tomasz Hołubowicz, revrari.
++ Ideas and/or user feedback :: Tomasz Hołubowicz, ersi-dnd, revrari.
 
 * COPYING
 :PROPERTIES:
diff --git a/substitute.el b/substitute.el
index b7b82f75f3..c1855acd8a 100644
--- a/substitute.el
+++ b/substitute.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Protesilaos Stavrou General Issues 
<~protesilaos/general-issues@lists.sr.ht>
 ;; URL: https://git.sr.ht/~protesilaos/substitute
 ;; Mailing-List: https://lists.sr.ht/~protesilaos/general-issues
-;; Version: 0.1.6
+;; Version: 0.1.7
 ;; Package-Requires: ((emacs "27.1"))
 
 ;; This file is NOT part of GNU Emacs.
@@ -149,6 +149,7 @@ Highlight the TARGET's matching occurences per the user 
option
 (defun substitute--prompt (target scope)
   "Return appropriate prompt based on `substitute-highlight'.
 Pass to it the TARGET and SCOPE arguments."
+  (barf-if-buffer-read-only)
   (funcall
    (if substitute-highlight
        'substitute--prompt-with-highlight



reply via email to

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