Commit 98faf1bb authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(keep-lines, flush-lines): Interactively report

read-only error	before reading regexp argument.
parent 155133a2
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment