From: Richard M. Stallman Date: Thu, 18 Jul 2002 15:00:56 +0000 (+0000) Subject: (keep-lines, flush-lines): Interactively report X-Git-Tag: ttn-vms-21-2-B4~14004 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=98faf1bb417f2cff92373fd89b98ee929b23d7db;p=emacs.git (keep-lines, flush-lines): Interactively report read-only error before reading regexp argument. --- 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 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))