(keep-lines, flush-lines): Interactively report
[bpt/emacs.git] / lisp / replace.el
index a66c9c0..7366d7f 100644 (file)
@@ -332,7 +332,9 @@ on the contents of the region.  Otherwise, operate from point to the
 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 @@ on the contents of the region.  Otherwise, operate from point to the
 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))