diff options
| author | Stefan Monnier | 2004-03-24 21:35:40 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-03-24 21:35:40 +0000 |
| commit | 1ec7bd14f9e2ed207b56d86455f08140d45eb2fc (patch) | |
| tree | 7df415e28563f3641e54f9ce3125edbdde219dfc | |
| parent | beb885fbbd1d86b9e7b2f3eed31a5ac417956cc0 (diff) | |
| download | emacs-1ec7bd14f9e2ed207b56d86455f08140d45eb2fc.tar.gz emacs-1ec7bd14f9e2ed207b56d86455f08140d45eb2fc.zip | |
(diff-font-lock-keywords): Disable yank-handler.
| -rw-r--r-- | lisp/diff-mode.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 9ae6bbee7c0..180fefcdd72 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -245,6 +245,9 @@ when editing big diffs)." | |||
| 245 | 245 | ||
| 246 | (defconst diff-yank-handler '(diff-yank-function)) | 246 | (defconst diff-yank-handler '(diff-yank-function)) |
| 247 | (defun diff-yank-function (text) | 247 | (defun diff-yank-function (text) |
| 248 | ;; FIXME: the yank-handler is now called separately on each piece of text | ||
| 249 | ;; with a yank-handler property, so the next-single-property-change call | ||
| 250 | ;; below will always return nil :-( --stef | ||
| 248 | (let ((mixed (next-single-property-change 0 'yank-handler text)) | 251 | (let ((mixed (next-single-property-change 0 'yank-handler text)) |
| 249 | (start (point))) | 252 | (start (point))) |
| 250 | ;; First insert the text. | 253 | ;; First insert the text. |
| @@ -275,14 +278,13 @@ when editing big diffs)." | |||
| 275 | ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n" | 278 | ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n" |
| 276 | (0 diff-header-face) (2 diff-file-header-face prepend)) | 279 | (0 diff-header-face) (2 diff-file-header-face prepend)) |
| 277 | ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) | 280 | ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) |
| 278 | ("^!.*\n" (0 '(face diff-changed-face yank-handler ,diff-yank-handler))) | 281 | ("^!.*\n" (0 diff-changed-face)) |
| 279 | ("^[+>].*\n" (0 '(face diff-added-face yank-handler ,diff-yank-handler))) | 282 | ("^[+>].*\n" (0 diff-added-face)) |
| 280 | ("^[-<].*\n" (0 '(face diff-removed-face yank-handler ,diff-yank-handler))) | 283 | ("^[-<].*\n" (0 diff-removed-face)) |
| 281 | ("^Index: \\(.+\\).*\n" (0 diff-header-face) (1 diff-index-face prepend)) | 284 | ("^Index: \\(.+\\).*\n" (0 diff-header-face) (1 diff-index-face prepend)) |
| 282 | ("^Only in .*\n" . diff-nonexistent-face) | 285 | ("^Only in .*\n" . diff-nonexistent-face) |
| 283 | ("^#.*" . font-lock-string-face) | 286 | ("^#.*" . font-lock-string-face) |
| 284 | ("^[^-=+*!<>].*\n" | 287 | ("^[^-=+*!<>].*\n" (0 diff-context-face)))) |
| 285 | (0 '(face diff-context-face yank-handler ,diff-yank-handler))))) | ||
| 286 | 288 | ||
| 287 | (defconst diff-font-lock-defaults | 289 | (defconst diff-font-lock-defaults |
| 288 | '(diff-font-lock-keywords t nil nil nil (font-lock-multiline . nil))) | 290 | '(diff-font-lock-keywords t nil nil nil (font-lock-multiline . nil))) |