[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el,v |
Date: |
Thu, 28 Sep 2006 19:06:40 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 06/09/28 19:06:40
Index: subr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/subr.el,v
retrieving revision 1.527
retrieving revision 1.528
diff -u -b -r1.527 -r1.528
--- subr.el 25 Sep 2006 23:03:39 -0000 1.527
+++ subr.el 28 Sep 2006 19:06:39 -0000 1.528
@@ -2167,11 +2167,32 @@
(let* ((handler (and (stringp string)
(get-text-property 0 'yank-handler string)))
(param (or (nth 1 handler) string))
- (opoint (point)))
+ (opoint (point))
+ end)
+
(setq yank-undo-function t)
(if (nth 0 handler) ;; FUNCTION
(funcall (car handler) param)
(insert param))
+ (setq end (point))
+
+ ;; What should we do with `font-lock-face' properties?
+ (if font-lock-defaults
+ ;; No, just wipe them.
+ (remove-list-of-text-properties opoint end '(font-lock-face))
+ ;; Convert them to `face'.
+ (save-excursion
+ (goto-char opoint)
+ (while (< (point) end)
+ (let ((face (get-text-property (point) 'font-lock-face))
+ run-end)
+ (setq run-end
+ (next-single-property-change (point) 'font-lock-face nil end))
+ (when face
+ (remove-text-properties (point) run-end '(font-lock-face nil))
+ (put-text-property (point) run-end 'face face))
+ (goto-char run-end)))))
+
(unless (nth 2 handler) ;; NOEXCLUDE
(remove-yank-excluded-properties opoint (point)))
(if (eq yank-undo-function t) ;; not set by FUNCTION
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v, Richard M. Stallman, 2006/09/10
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v, Kim F. Storm, 2006/09/11
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v, Vinicius Jose Latorre, 2006/09/20
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v, Jason Rumney, 2006/09/25
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v,
Richard M. Stallman <=