help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: diff-mode


From: Elena
Subject: Re: diff-mode
Date: Sun, 12 Dec 2010 10:26:48 -0800 (PST)
User-agent: G2/1.0

On Dec 12, 7:23 pm, Elena <egarr...@gmail.com> wrote:
> On Dec 12, 12:44 pm, Andrea Crotti <andrea.crott...@gmail.com> wrote:
>
>
>
> > The other day I was preparing a talk with a collegue on revision
> > control, and we've also show how to use basic diff and patch.
>
> > Even if most of the work was done in emacs, we used vim to show the diff
> > file, since it's much more colorful.
>
> > Anyway after I solved customizing some faces
>
> >  '(diff-added ((t (:inherit diff-changed :background "black" :foreground 
> > "Yellow"))))
> >  '(diff-changed ((nil (:foreground "medium purple"))))
> >  '(diff-header ((((class color) (min-colors 88) (background dark)) 
> > (:background "grey22" :foreground "red" :height 1.2))))
> >  '(diff-indicator-removed ((t (:inherit diff-removed))))
> >  '(diff-removed ((t (:background "black" :foreground "indian red"))))
>
> > Now it's even too much contrast :D
> > But then I thought, wouldn't it be possible to show the normal syntax
> > highlighting of the given mode and use some background/font style to
> > differentiate what's to add/remove?
>
> I think you would have to use overlays for that.  I don't know of any
> diff-based package which does that.

According to Emacs Lisp Reference, text properties are better for this
kind of task:

http://www.gnu.org/software/emacs/elisp/html_node/Text-Properties.html#Text-Properties


reply via email to

[Prev in Thread] Current Thread [Next in Thread]