From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: smd Newsgroups: gmane.emacs.help Subject: Patch syntax coloring for xemacs / XP Date: Sun, 28 Sep 2008 03:28:12 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7678168f-2b9c-4fb6-b197-0f0acf3a2f92@m45g2000hsb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1222608406 3043 80.91.229.12 (28 Sep 2008 13:26:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Sep 2008 13:26:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 28 15:27:44 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KjwJM-0004Hg-0r for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Sep 2008 15:27:44 +0200 Original-Received: from localhost ([127.0.0.1]:33757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjwIJ-0007a3-Co for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Sep 2008 09:26:39 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!m45g2000hsb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: 83.89.47.167 Original-X-Trace: posting.google.com 1222597692 12871 127.0.0.1 (28 Sep 2008 10:28:12 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 28 Sep 2008 10:28:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m45g2000hsb.googlegroups.com; posting-host=83.89.47.167; posting-account=kDQjSAoAAACeyynALgoV-CuVNQAdJ2Hg User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:162818 X-Mailman-Approved-At: Sun, 28 Sep 2008 09:24:42 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58161 Archived-At: 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...