# HG changeset patch # User Eli Zaretskii # Date 1072697984 0 # Node ID 6dab9150c9e051f22a49882fd20e8a0d2a48fbd7 # Parent fbdcff26f02abe9db77873c256952a2186695b1c (insert-for-yank): Call insert-for-yank-1 repetitively for each yank-handler segment. (insert-for-yank-1): New function, with the body of the previous insert-for-yank. diff -r fbdcff26f02a -r 6dab9150c9e0 lisp/subr.el --- a/lisp/subr.el Mon Dec 29 11:29:31 2003 +0000 +++ b/lisp/subr.el Mon Dec 29 11:39:44 2003 +0000 @@ -1563,7 +1563,18 @@ (defvar yank-undo-function) (defun insert-for-yank (string) + "Calls `insert-for-yank-1' repetitively for each `yank-handler' segment. + +See `insert-for-yank-1' for more details." + (let (to) + (while (setq to (next-single-property-change 0 'yank-handler string)) + (insert-for-yank-1 (substring string 0 to)) + (setq string (substring string to)))) + (insert-for-yank-1 string)) + +(defun insert-for-yank-1 (string) "Insert STRING at point, stripping some text properties. + Strip text properties from the inserted text according to `yank-excluded-properties'. Otherwise just like (insert STRING).