From: smd <sssmmmddd@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Patch syntax coloring for xemacs / XP
Date: Sun, 28 Sep 2008 03:28:12 -0700 (PDT) [thread overview]
Message-ID: <7678168f-2b9c-4fb6-b197-0f0acf3a2f92@m45g2000hsb.googlegroups.com> (raw)
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...
next reply other threads:[~2008-09-28 10:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-28 10:28 smd [this message]
2008-09-28 13:47 ` Patch syntax coloring for xemacs / XP Lennart Borgman (gmail)
2008-09-28 14:35 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7678168f-2b9c-4fb6-b197-0f0acf3a2f92@m45g2000hsb.googlegroups.com \
--to=sssmmmddd@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).