]> git.eshelyaron.com Git - emacs.git/commitdiff
(diff-font-lock-keywords): Disable yank-handler.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 24 Mar 2004 21:35:40 +0000 (21:35 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 24 Mar 2004 21:35:40 +0000 (21:35 +0000)
lisp/diff-mode.el

index 9ae6bbee7c0e35deda44dd38dff8ed47a2fcdd73..180fefcdd725770eb43080eb4f892a1d194647e4 100644 (file)
@@ -245,6 +245,9 @@ when editing big diffs)."
 
 (defconst diff-yank-handler '(diff-yank-function))
 (defun diff-yank-function (text)
+  ;; FIXME: the yank-handler is now called separately on each piece of text
+  ;; with a yank-handler property, so the next-single-property-change call
+  ;; below will always return nil :-(   --stef
   (let ((mixed (next-single-property-change 0 'yank-handler text))
        (start (point)))
     ;; First insert the text.
@@ -275,14 +278,13 @@ when editing big diffs)."
     ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n"
      (0 diff-header-face) (2 diff-file-header-face prepend))
     ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face)
-    ("^!.*\n" (0 '(face diff-changed-face yank-handler ,diff-yank-handler)))
-    ("^[+>].*\n" (0 '(face diff-added-face yank-handler ,diff-yank-handler)))
-    ("^[-<].*\n" (0 '(face diff-removed-face yank-handler ,diff-yank-handler)))
+    ("^!.*\n" (0 diff-changed-face))
+    ("^[+>].*\n" (0 diff-added-face))
+    ("^[-<].*\n" (0 diff-removed-face))
     ("^Index: \\(.+\\).*\n" (0 diff-header-face) (1 diff-index-face prepend))
     ("^Only in .*\n" . diff-nonexistent-face)
     ("^#.*" . font-lock-string-face)
-    ("^[^-=+*!<>].*\n"
-     (0 '(face diff-context-face yank-handler ,diff-yank-handler)))))
+    ("^[^-=+*!<>].*\n" (0 diff-context-face))))
 
 (defconst diff-font-lock-defaults
   '(diff-font-lock-keywords t nil nil nil (font-lock-multiline . nil)))