~protesilaos/substitute

d7dcd3b1ae4d910ce5d698f5bc09fa8b9a638398 — Protesilaos Stavrou 1 year, 8 months ago a25d1d2
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>.
2 files changed, 3 insertions(+), 2 deletions(-)

M README.org
M substitute.el
M README.org => README.org +1 -1
@@ 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:

M substitute.el => substitute.el +2 -1
@@ 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