comparison lisp/simple.el @ 15892:6a4227841dec

(kill-region): inhibit-read-only overrides text props too.
author Richard M. Stallman <rms@gnu.org>
date Wed, 21 Aug 1996 16:20:39 +0000
parents d814bc72503f
children 6a1a664be9f6
comparison
equal deleted inserted replaced
15891:dbc8c9c9d819 15892:6a4227841dec
1219 (cond 1219 (cond
1220 1220
1221 ;; If the buffer is read-only, we should beep, in case the person 1221 ;; If the buffer is read-only, we should beep, in case the person
1222 ;; just isn't aware of this. However, there's no harm in putting 1222 ;; just isn't aware of this. However, there's no harm in putting
1223 ;; the region's text in the kill ring, anyway. 1223 ;; the region's text in the kill ring, anyway.
1224 ((or (and buffer-read-only (not inhibit-read-only)) 1224 ((and (not inhibit-read-only)
1225 (text-property-not-all beg end 'read-only nil)) 1225 (or buffer-read-only
1226 (text-property-not-all beg end 'read-only nil)))
1226 (copy-region-as-kill beg end) 1227 (copy-region-as-kill beg end)
1227 ;; This should always barf, and give us the correct error. 1228 ;; This should always barf, and give us the correct error.
1228 (if kill-read-only-ok 1229 (if kill-read-only-ok
1229 (message "Read only text copied to kill ring") 1230 (message "Read only text copied to kill ring")
1230 (setq this-command 'kill-region) 1231 (setq this-command 'kill-region)