Commit 1537a263 authored by Jim Blandy's avatar Jim Blandy
Browse files

* simple.el (kill-region): If the buffer is read-only, call

	`barf-if-buffer-read-only' instead of just `ding', to get the
	appropriate error condition and message.

	* simple.el (insert-buffer): Make sure this returns nil.

	* simple.el (quoted-insert): Use insert-char, instead of writing
	out the loop.
parent bf3c8a70
......@@ -65,9 +65,7 @@ use overstrike as your normal editing mode, you can use this function
to insert characters when necessary."
(interactive "*p")
(let ((char (read-quoted-char)))
(while (> arg 0)
(insert char)
(setq arg (1- arg)))))
(insert-char char arg)))
(defun delete-indentation (&optional arg)
"Join this line to previous and fix up whitespace at join.
......@@ -988,7 +986,8 @@ to make one entry in the kill ring."
;; the region's text in the kill ring, anyway.
(copy-region-as-kill beg end)
;; This should always barf, and give us the correct error.
;; In certain cases, we can arrange for the undo list and the kill
;; ring to share the same string object. This code does that.
......@@ -1109,7 +1108,8 @@ BUFFER may be a buffer or a buffer name."
(setq start (point-min) end (point-max)))
(insert-buffer-substring buffer start end)
(setq newmark (point)))
(push-mark newmark)))
(push-mark newmark))
(defun append-to-buffer (buffer start end)
"Append to specified buffer the text of the region.
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