aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-07-18 15:00:56 +0000
committerRichard M. Stallman2002-07-18 15:00:56 +0000
commit98faf1bb417f2cff92373fd89b98ee929b23d7db (patch)
tree9449152ad3726f3271f624056bea6941dc345aa5
parent155133a2576f1c37d1026f2d45e89aa822826782 (diff)
downloademacs-98faf1bb417f2cff92373fd89b98ee929b23d7db.tar.gz
emacs-98faf1bb417f2cff92373fd89b98ee929b23d7db.zip
(keep-lines, flush-lines): Interactively report
read-only error before reading regexp argument.
-rw-r--r--lisp/replace.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index a66c9c0dfc2..7366d7fa49f 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -332,7 +332,9 @@ on the contents of the region. Otherwise, operate from point to the
332end of the buffer." 332end of the buffer."
333 333
334 (interactive 334 (interactive
335 (keep-lines-read-args "Keep lines (containing match for regexp): ")) 335 (progn
336 (barf-if-buffer-read-only)
337 (keep-lines-read-args "Keep lines (containing match for regexp): ")))
336 (if rstart 338 (if rstart
337 (progn 339 (progn
338 (goto-char (min rstart rend)) 340 (goto-char (min rstart rend))
@@ -381,7 +383,9 @@ on the contents of the region. Otherwise, operate from point to the
381end of the buffer." 383end of the buffer."
382 384
383 (interactive 385 (interactive
384 (keep-lines-read-args "Flush lines (containing match for regexp): ")) 386 (progn
387 (barf-if-buffer-read-only)
388 (keep-lines-read-args "Flush lines (containing match for regexp): ")))
385 (if rstart 389 (if rstart
386 (progn 390 (progn
387 (goto-char (min rstart rend)) 391 (goto-char (min rstart rend))