summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2000-10-18 08:52:23 +0000
committerEli Zaretskii <eliz@gnu.org>2000-10-18 08:52:23 +0000
commit34460354261d9473c0b91aa70534c6203c91003d (patch)
tree9ce5df3a6654c2a102ab9abc319ca940125c5d04 /lisp/diff-mode.el
parent00de298745d01c08289fab1b81c1c28795e2561c (diff)
downloademacs-34460354261d9473c0b91aa70534c6203c91003d.tar.gz
emacs-34460354261d9473c0b91aa70534c6203c91003d.tar.bz2
emacs-34460354261d9473c0b91aa70534c6203c91003d.zip
(diff-header-face, diff-file-header-face)
(diff-changed-face): Add bold and italic attributes to tty faces. (diff-function-face): New face. (diff-font-lock-keywords): Use it.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 3889c1e21b4..b9c3f393d6d 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -4,7 +4,7 @@
;; Author: Stefan Monnier <monnier@cs.yale.edu>
;; Keywords: patch diff
-;; Revision: $Id: diff-mode.el,v 1.30 2000/10/17 12:12:00 eliz Exp $
+;; Revision: $Id: diff-mode.el,v 1.31 2000/10/17 15:55:09 monnier Exp $
;; This file is part of GNU Emacs.
@@ -169,9 +169,9 @@ when editing big diffs)."
(defface diff-header-face
'((((type tty pc) (class color) (background light))
- (:foreground "lightblue"))
+ (:foreground "blue1" :bold t))
(((type tty pc) (class color) (background dark))
- (:foreground "green"))
+ (:foreground "green" :bold t))
(((class color) (background light))
(:background "grey85"))
(((class color) (background dark))
@@ -183,9 +183,9 @@ when editing big diffs)."
(defface diff-file-header-face
'((((type tty pc) (class color) (background light))
- (:foreground "yellow"))
+ (:foreground "yellow" :bold t))
(((type tty pc) (class color) (background dark))
- (:foreground "cyan"))
+ (:foreground "cyan" :bold t))
(((class color) (background light))
(:background "grey70" :bold t))
(((class color) (background dark))
@@ -221,14 +221,20 @@ when editing big diffs)."
(defface diff-changed-face
'((((type tty pc) (class color) (background light))
- (:foreground "magenta"))
+ (:foreground "magenta" :bold t :italic t))
(((type tty pc) (class color) (background dark))
- (:foreground "yellow"))
+ (:foreground "yellow" :bold t :italic t))
(t ()))
"`diff-mode' face used to highlight changed lines."
:group 'diff-mode)
(defvar diff-changed-face 'diff-changed-face)
+(defface diff-function-face
+ '((t (:inherit diff-context-face)))
+ "`diff-mode' face used to highlight function names produced by \"diff -p\"."
+ :group 'diff-mode)
+(defvar diff-function-face 'diff-function-face)
+
(defface diff-context-face
'((((class color) (background light))
(:foreground "grey50"))
@@ -242,12 +248,12 @@ when editing big diffs)."
(defvar diff-font-lock-keywords
'(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" ;unified
(1 diff-hunk-header-face)
- (2 diff-context-face))
+ (2 diff-function-face))
("^--- .+ ----$" ;context
. diff-hunk-header-face)
("\\(\\*\\{15\\}\\)\\(.*\\)$" ;context
(1 diff-hunk-header-face)
- (2 diff-context-face))
+ (2 diff-function-face))
("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-hunk-header-face) ;context
("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n"
(0 diff-header-face) (2 diff-file-header-face prepend))