# HG changeset patch # User Richard M. Stallman # Date 1027004456 0 # Node ID 6de9114ee49abd99ce3f76698c95de31adad59f6 # Parent c6ca69a1c8d3f42d584e20415b55dec8df6d6ef9 (keep-lines, flush-lines): Interactively report read-only error before reading regexp argument. diff -r c6ca69a1c8d3 -r 6de9114ee49a lisp/replace.el --- a/lisp/replace.el Thu Jul 18 15:00:01 2002 +0000 +++ b/lisp/replace.el Thu Jul 18 15:00:56 2002 +0000 @@ -332,7 +332,9 @@ end of the buffer." (interactive - (keep-lines-read-args "Keep lines (containing match for regexp): ")) + (progn + (barf-if-buffer-read-only) + (keep-lines-read-args "Keep lines (containing match for regexp): "))) (if rstart (progn (goto-char (min rstart rend)) @@ -381,7 +383,9 @@ end of the buffer." (interactive - (keep-lines-read-args "Flush lines (containing match for regexp): ")) + (progn + (barf-if-buffer-read-only) + (keep-lines-read-args "Flush lines (containing match for regexp): "))) (if rstart (progn (goto-char (min rstart rend))