diff options
| -rw-r--r-- | lisp/subr.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 523cc209ff4..8c7212e5ef1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1431,19 +1431,21 @@ Replaces `category' properties with their defined properties." | |||
| 1431 | (while (< (point) end) | 1431 | (while (< (point) end) |
| 1432 | (let ((cat (get-text-property (point) 'category)) | 1432 | (let ((cat (get-text-property (point) 'category)) |
| 1433 | run-end) | 1433 | run-end) |
| 1434 | (when cat | ||
| 1435 | (setq run-end | ||
| 1436 | (next-single-property-change (point) 'category nil end)) | ||
| 1437 | (remove-list-of-text-properties (point) run-end '(category)) | ||
| 1438 | (add-text-properties (point) run-end (symbol-plist cat)) | ||
| 1439 | (goto-char (or run-end end))) | ||
| 1440 | (setq run-end | 1434 | (setq run-end |
| 1441 | (next-single-property-change (point) 'category nil end)) | 1435 | (next-single-property-change (point) 'category nil end)) |
| 1442 | (goto-char (or run-end end)))))) | 1436 | (when cat |
| 1437 | (let (run-end2 original) | ||
| 1438 | (remove-list-of-text-properties (point) run-end '(category)) | ||
| 1439 | (while (< (point) run-end) | ||
| 1440 | (setq run-end2 (next-property-change (point) nil run-end)) | ||
| 1441 | (setq original (text-properties-at (point))) | ||
| 1442 | (set-text-properties (point) run-end2 (symbol-plist cat)) | ||
| 1443 | (add-text-properties (point) run-end2 original) | ||
| 1444 | (goto-char run-end2)))) | ||
| 1445 | (goto-char run-end))))) | ||
| 1443 | (if (eq yank-excluded-properties t) | 1446 | (if (eq yank-excluded-properties t) |
| 1444 | (set-text-properties start end nil) | 1447 | (set-text-properties start end nil) |
| 1445 | (remove-list-of-text-properties start end | 1448 | (remove-list-of-text-properties start end yank-excluded-properties)))) |
| 1446 | yank-excluded-properties)))) | ||
| 1447 | 1449 | ||
| 1448 | (defun insert-for-yank (&rest strings) | 1450 | (defun insert-for-yank (&rest strings) |
| 1449 | "Insert STRINGS at point, stripping some text properties. | 1451 | "Insert STRINGS at point, stripping some text properties. |