aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2007-02-09 23:09:16 +0000
committerChong Yidong2007-02-09 23:09:16 +0000
commit029fd82cce8317b74e5934240b134f556a008f81 (patch)
tree4b45b2860bd657dbf0e537663fd148a892979e08
parent0c92208b5be37ef61fcb9043109e540c57d05e00 (diff)
downloademacs-029fd82cce8317b74e5934240b134f556a008f81.tar.gz
emacs-029fd82cce8317b74e5934240b134f556a008f81.zip
(insert-for-yank-1): Prevent read-only properties from interfering
with text property operations.
-rw-r--r--lisp/subr.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 45815a6f0f8..846acf52385 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2171,6 +2171,7 @@ If UNDO is present and non-nil, it is a function that will be called
2171 (get-text-property 0 'yank-handler string))) 2171 (get-text-property 0 'yank-handler string)))
2172 (param (or (nth 1 handler) string)) 2172 (param (or (nth 1 handler) string))
2173 (opoint (point)) 2173 (opoint (point))
2174 (inhibit-read-only inhibit-read-only)
2174 end) 2175 end)
2175 2176
2176 (setq yank-undo-function t) 2177 (setq yank-undo-function t)
@@ -2179,6 +2180,10 @@ If UNDO is present and non-nil, it is a function that will be called
2179 (insert param)) 2180 (insert param))
2180 (setq end (point)) 2181 (setq end (point))
2181 2182
2183 ;; Prevent read-only properties from interfering with the
2184 ;; following text property changes.
2185 (setq inhibit-read-only t)
2186
2182 ;; What should we do with `font-lock-face' properties? 2187 ;; What should we do with `font-lock-face' properties?
2183 (if font-lock-defaults 2188 (if font-lock-defaults
2184 ;; No, just wipe them. 2189 ;; No, just wipe them.