diff options
| author | Stefan Monnier | 2001-05-01 13:33:59 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-05-01 13:33:59 +0000 |
| commit | 469fc0a23fd52eae6a754d2439acae358016bcd7 (patch) | |
| tree | c3364314156c27b28486cb30b3d831d6372aa8b7 | |
| parent | ed438271883d22cc66abea45b75817b67dcddb41 (diff) | |
| download | emacs-469fc0a23fd52eae6a754d2439acae358016bcd7.tar.gz emacs-469fc0a23fd52eae6a754d2439acae358016bcd7.zip | |
(diff-nonexistant-face): New face.
(diff-font-lock-keywords): Use it.
| -rw-r--r-- | lisp/diff-mode.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index b53d36bfc79..894a221539d 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 5 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
| 6 | ;; Keywords: patch diff | 6 | ;; Keywords: patch diff |
| 7 | ;; Revision: $Id: diff-mode.el,v 1.35 2000/11/14 18:09:21 fx Exp $ | ||
| 8 | 7 | ||
| 9 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 10 | 9 | ||
| @@ -250,12 +249,17 @@ when editing big diffs)." | |||
| 250 | :group 'diff-mode) | 249 | :group 'diff-mode) |
| 251 | (defvar diff-context-face 'diff-context-face) | 250 | (defvar diff-context-face 'diff-context-face) |
| 252 | 251 | ||
| 252 | (defface diff-nonexistant-face | ||
| 253 | '((t (:inherit diff-file-header-face))) | ||
| 254 | "`diff-mode' face used to highlight nonexistant files in recursive diffs." | ||
| 255 | :group 'diff-mode) | ||
| 256 | (defvar diff-nonexistant-face 'diff-nonexistant-face) | ||
| 257 | |||
| 253 | (defvar diff-font-lock-keywords | 258 | (defvar diff-font-lock-keywords |
| 254 | '(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" ;unified | 259 | '(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" ;unified |
| 255 | (1 diff-hunk-header-face) | 260 | (1 diff-hunk-header-face) |
| 256 | (2 diff-function-face)) | 261 | (2 diff-function-face)) |
| 257 | ("^--- .+ ----$" ;context | 262 | ("^--- .+ ----$" . diff-hunk-header-face) ;context |
| 258 | . diff-hunk-header-face) | ||
| 259 | ("\\(\\*\\{15\\}\\)\\(.*\\)$" ;context | 263 | ("\\(\\*\\{15\\}\\)\\(.*\\)$" ;context |
| 260 | (1 diff-hunk-header-face) | 264 | (1 diff-hunk-header-face) |
| 261 | (2 diff-function-face)) | 265 | (2 diff-function-face)) |
| @@ -267,6 +271,7 @@ when editing big diffs)." | |||
| 267 | ("^[+>].*\n" . diff-added-face) | 271 | ("^[+>].*\n" . diff-added-face) |
| 268 | ("^[-<].*\n" . diff-removed-face) | 272 | ("^[-<].*\n" . diff-removed-face) |
| 269 | ("^Index: \\(.+\\).*\n" (0 diff-header-face) (1 diff-index-face prepend)) | 273 | ("^Index: \\(.+\\).*\n" (0 diff-header-face) (1 diff-index-face prepend)) |
| 274 | ("^Only in .*\n" . diff-nonexistant-face) | ||
| 270 | ("^#.*" . font-lock-string-face) | 275 | ("^#.*" . font-lock-string-face) |
| 271 | ("^[^-=+*!<>].*\n" . diff-context-face))) | 276 | ("^[^-=+*!<>].*\n" . diff-context-face))) |
| 272 | 277 | ||