summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-03-02 07:33:17 +0000
committerJim Blandy <jimb@redhat.com>1993-03-02 07:33:17 +0000
commit1537a263af5cd865107ad051c41105a1534e0074 (patch)
treef1127ad2d76dd13bfc8d732835d9e14a8df25aa6 /lisp
parentbf3c8a700022acc273c8763437ca35d6859b670e (diff)
downloademacs-1537a263af5cd865107ad051c41105a1534e0074.tar.gz
* 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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index efe38907cb0..4276478f844 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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.
(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 @@ 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))
+ nil)
(defun append-to-buffer (buffer start end)
"Append to specified buffer the text of the region.