# HG changeset patch # User Jim Blandy # Date 731057597 0 # Node ID d65c1fefc6369a775b9535147683f371ad4e3160 # Parent bde0ca7e33b37ebc566a234de42444c963b1b50d * 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. diff -r bde0ca7e33b3 -r d65c1fefc636 lisp/simple.el --- a/lisp/simple.el Tue Mar 02 07:29:47 1993 +0000 +++ b/lisp/simple.el Tue Mar 02 07:33:17 1993 +0000 @@ -65,9 +65,7 @@ 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 @@ ;; the region's text in the kill ring, anyway. (buffer-read-only (copy-region-as-kill beg end) - (ding)) + ;; This should always barf, and give us the correct error. + (barf-if-buffer-read-only)) ;; 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 @@ (setq start (point-min) end (point-max))) (insert-buffer-substring buffer start end) (setq newmark (point))) - (push-mark newmark))) + (push-mark newmark)) + nil) (defun append-to-buffer (buffer start end) "Append to specified buffer the text of the region.