Diffing in Emacs

08 Jan. 2010

Diffing in Emacs can be surprisingly sweet. Here is my screen.

I am using diff-mode- inside Carbon Emacs along with the modifications shown below to use my colors.

10c10
< ;; Last-Updated: Sat Aug  1 15:15:22 2009 (-0700)
---
> ;; Last-Updated: Sat Dec 27 10:19:33 2008 (-0800)
12c12
< ;;     Update #: 647
---
> ;;     Update #: 646
15c15
< ;; Compatibility: GNU Emacs: 21.x, 22.x, 23.x
---
> ;; Compatibility: GNU Emacs 21.x, GNU Emacs 22.x
116c116
<   '((t (:foreground "Blue" :background "DarkSeaGreen1")))
---
>   '((t (:foreground "Blue" :background "Green")))
135c135
<   '((t (:foreground "PaleGoldenrod" :background "DarkGreen")))
---
>   '((t (:foreground "PaleGoldenrod" :background "Green")))
141c141
<   '((t (:foreground "PaleGoldenrod" :background "DarkMagenta")))
---
>   '((t (:foreground "PaleGoldenrod" :background "DarkRed")))
148c148
<  '(diff-added ((t (:foreground "DarkGreen"))) 'now)
---
>  '(diff-added ((t (:foreground "Green"))) 'now)
150,151c150,151
<  '(diff-context ((t (:foreground "Black"))) 'now)
<  '(diff-file-header ((t (:foreground "Red" :background "White"))) 'now)
---
>  '(diff-context ((t (:foreground "grey50"))) 'now)
>  '(diff-file-header ((t (:foreground "Red" :background "gray15"))) 'now)
153,154c153,154
<  '(diff-header ((t (:foreground "Red"))) 'now)
<  '(diff-hunk-header ((t (:foreground "White" :background "Salmon"))) 'now)
---
>  '(diff-header ((t (:foreground "Red" :background "gray15"))) 'now)
>  '(diff-hunk-header ((t (:foreground "White" :background "gray15"))) 'now)
157c157,159
<  '(diff-removed ((t (:foreground "DarkMagenta"))) 'now)
---
>  '(diff-removed ((t (:foreground "DarkRed"))) 'now)
>  '(diff-indicator-added-face ((t (:foreground "Green"))) 'now)
>  '(diff-indicator-removed-face ((t (:foreground "Red"))) 'now)
168c170
<     ("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-file1-hunk-header-face) ;context
---
> 	("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-file1-hunk-header-face) ;context
171c173
<     ("^---$" . diff-hunk-header-face)   ;normal
---
> 	("^---$" . diff-hunk-header-face)   ;normal
183c185,186
<     ("^[^-=+*!<>#].*\n" (0 diff-context-face))))
---
>     ("^[^-=+*!<>#].*\n" (0 diff-context-face))
> 	))