all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Patch syntax coloring for xemacs / XP
@ 2008-09-28 10:28 smd
  2008-09-28 13:47 ` Lennart Borgman (gmail)
  2008-09-28 14:35 ` Drew Adams
  0 siblings, 2 replies; 3+ messages in thread
From: smd @ 2008-09-28 10:28 UTC (permalink / raw
  To: help-gnu-emacs

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...


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch syntax coloring for xemacs / XP
  2008-09-28 10:28 Patch syntax coloring for xemacs / XP smd
@ 2008-09-28 13:47 ` Lennart Borgman (gmail)
  2008-09-28 14:35 ` Drew Adams
  1 sibling, 0 replies; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-28 13:47 UTC (permalink / raw
  To: smd; +Cc: help-gnu-emacs

smd wrote:
> However, it seems these options do not get saved with xemacs, so I
> have to re-do the procedure each time I start it...

Before you are asking more details here: Are you using xemacs or gnu
emacs? This mailing list is for the later.

  http://www.xemacs.org/
  http://www.gnu.org/software/emacs/

They are similar in many respects, but there are a lot of details that
differs. Unfortunately.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Patch syntax coloring for xemacs / XP
  2008-09-28 10:28 Patch syntax coloring for xemacs / XP smd
  2008-09-28 13:47 ` Lennart Borgman (gmail)
@ 2008-09-28 14:35 ` Drew Adams
  1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2008-09-28 14:35 UTC (permalink / raw
  To: 'smd', help-gnu-emacs

> 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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-28 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-28 10:28 Patch syntax coloring for xemacs / XP smd
2008-09-28 13:47 ` Lennart Borgman (gmail)
2008-09-28 14:35 ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.