diff options
author | Richard M. Stallman <[email protected]> | 1997-07-21 22:29:32 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1997-07-21 22:29:32 +0000 |
commit | 6cd829a85b7c5958276f5e3ad1394bc01558b192 (patch) | |
tree | 30caeac95ba46c7cd9730f44c0a270d85224b4d5 | |
parent | eaff57bb126defa4507588ae2a9463b380d62422 (diff) |
(yank, yank-pop): Bind inhibit-read-only
just for remove-text-properties, not for insertion.
-rw-r--r-- | lisp/simple.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index a2720e2f56..d4166977cb 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1498,10 +1498,10 @@ comes the newest one." (before (< (point) (mark t)))) (delete-region (point) (mark t)) (set-marker (mark-marker) (point) (current-buffer)) - (let ((opoint (point)) - (inhibit-read-only t)) + (let ((opoint (point))) (insert (current-kill arg)) - (remove-text-properties opoint (point) '(read-only nil))) + (let ((inhibit-read-only t)) + (remove-text-properties opoint (point) '(read-only nil)))) (if before ;; This is like exchange-point-and-mark, but doesn't activate the mark. ;; It is cleaner to avoid activation, even though the command @@ -1523,13 +1523,13 @@ See also the command \\[yank-pop]." ;; for the following command. (setq this-command t) (push-mark (point)) - (let ((opoint (point)) - (inhibit-read-only t)) + (let ((opoint (point))) (insert (current-kill (cond ((listp arg) 0) ((eq arg '-) -1) (t (1- arg))))) - (remove-text-properties opoint (point) '(read-only nil))) + (let ((inhibit-read-only t)) + (remove-text-properties opoint (point) '(read-only nil)))) (if (consp arg) ;; This is like exchange-point-and-mark, but doesn't activate the mark. ;; It is cleaner to avoid activation, even though the command |