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

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

RE: Patch syntax coloring for xemacs / XP


From: Drew Adams
Subject: RE: Patch syntax coloring for xemacs / XP
Date: Sun, 28 Sep 2008 07:35:58 -0700

> This took me forever to find :) I am a total newb, and wanted to use
> the facilities of Emacs that allow for editing of diff patch files
> (like hunk row calculations, etc)... As soon as I installed the latest
> version, and opened a patch file, and chosen font-lock-mode (I guess
> the syntax coloring mode), I could see that *only* the patch headers
> are colored, but not the added/removed files (i.e. those starting with
> + / - in a patch file). (As I also messed up the diff-mode display, ow
> I als have to start it by using Alt-X, then type "diff-mode" and
> Enter, an say no to "convert contents back to binary format").
> 
> Once you're sure you're in diff-mode, and syntax-coloring is on, heres
> how to get those rows to color:
> - Options / Edit Faces...
> - scroll down, and find Diff Added Face, and Diff Changed Face, and
> change those by clicking the little trangle, clicking the box next to
> Foreground/Background in the subsequently opened options, and type in
> a color like 'red', preview will be enabled
> --- Note that these options (Diff Added Face) will NOT be present,
> unless diff-mode is currently active
> --- notice that Diff Context Face should already be defaulted to a
> gray color
> - to save, right click, select Save
> 
> After this, the patch should have th lines correspondingly colored.
> This process should make a file, custom.el, with the following
> contents:
> (custom-set-variables)
> (custom-set-faces
>  '(diff-added-face ((t (:foreground "red"))))
>  '(diff-changed-face ((t (:foreground "darkorange"))))
>  '(diff-removed-face ((t (:foreground "blue")))))
> 
> However, it seems these options do not get saved with xemacs, so I
> have to re-do the procedure each time I start it...

Dunno if it helps with XEmacs (probably not), but you might also want to take a
look at http://www.emacswiki.org/cgi-bin/wiki/DiffEnhancements.





reply via email to

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