From: Eli Zaretskii Date: Mon, 29 Dec 2003 11:40:49 +0000 (+0000) Subject: (insert-for-yank): Call insert-for-yank-1 repetitively X-Git-Tag: ttn-vms-21-2-B4~8113 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=529c94091fdfe481911dcc45f8d3ad84c3e406b3;p=emacs.git (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 --git a/lisp/ChangeLog b/lisp/ChangeLog index b0241e0d9c4..aa15eff2d71 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2003-12-29 Takaaki Ota + + * subr.el (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. + + * textmodes/table.el (table-yank-handler): New defcustom. + (table--put-cell-indicator-property): Put yank-handler property + that indicates the yank handler for the table cell. + 2003-12-29 Jesper Harder (tiny change) * generic-x.el (etc-modules-conf-generic-mode): A more complete diff --git a/lisp/subr.el b/lisp/subr.el index 2996f2903e0..e760936572b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1563,7 +1563,18 @@ Replaces `category' properties with their defined properties." (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).