From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steven Thomas Newsgroups: gmane.emacs.help Subject: Re: M-x shell, run 'emacs --help', get colorized output... why? Date: Fri, 21 Jan 2011 17:48:02 -0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6deddc8a1e18e049a658efc X-Trace: dough.gmane.org 1295660908 16259 80.91.229.12 (22 Jan 2011 01:48:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 Jan 2011 01:48:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 22 02:48:24 2011 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.69) (envelope-from ) id 1PgSaV-0006M7-Ox for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Jan 2011 02:48:24 +0100 Original-Received: from localhost ([127.0.0.1]:59393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgSaV-0008VH-Bf for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Jan 2011 20:48:23 -0500 Original-Received: from [140.186.70.92] (port=37725 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgSaC-0008V3-Nm for help-gnu-emacs@gnu.org; Fri, 21 Jan 2011 20:48:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgSaB-0001Q8-Ns for help-gnu-emacs@gnu.org; Fri, 21 Jan 2011 20:48:04 -0500 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:52592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgSaB-0001Q4-Ip for help-gnu-emacs@gnu.org; Fri, 21 Jan 2011 20:48:03 -0500 Original-Received: by wwb17 with SMTP id 17so2580788wwb.30 for ; Fri, 21 Jan 2011 17:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ab0ijwX9KG3HQu6jGwjcFQ/WL1SDidmOgLbXy/YrNog=; b=KUZ6gRsAutoHzE5zUoFbfkQ+FYX/lFY6Q1zGe6iDgpFOrlscxD2MQpPMBMfYpQLrSE jFdnrQQUEv2fZb5sxaBD1uZnZx8CKQ/zWju+E9rlTSEUkFBh+k6tBHZH1AU5HFm0gHt3 SESr+ShXEVdzkAZ+6jA+rWDzIalu9EHhPuazc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=kzx2d/3jND2dLDCkNtDyqKQCDjjI+0gD0ddk7UEboXY/HaHAehxhvCTKcnLTws/IT9 BACZIJPJMPH0E/F3Xz3c9iT3PSr8tq9mWTVBtnFJz+LZUWMqO8Q9huICylOfMoCHhr1s nTL3gt3eDQiFc5XKZDIJdK3mkZKhfzlhHQGGw= Original-Received: by 10.216.143.2 with SMTP id k2mr1419676wej.66.1295660882190; Fri, 21 Jan 2011 17:48:02 -0800 (PST) Original-Received: by 10.216.90.207 with HTTP; Fri, 21 Jan 2011 17:48:02 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:78655 Archived-At: --0016e6deddc8a1e18e049a658efc Content-Type: text/plain; charset=ISO-8859-1 It turns out shell.el is deliberately doing this, as I expected. The regexps they use for the matching are in shell-font-lock-keywords. They don't work that well (e.g. matching "--whatever" in the middle of a line, but not at the beginning) and I find the colors distracting, so I just disabled the coloring with (setq shell-font-lock-keywords nil). On Sun, Jan 16, 2011 at 6:11 PM, Steven Thomas wrote: > I notice that emacs shell-mode colorizes certain strings in the output of a > command you run. For example most (though not all) words starting with - or > -- get colorized. You can see this if you run emacs --help. I don't see this > goofy colorization in term mode or eshell mode. > > Can anyone explain what the deal is? A cursory look at the code in shell.el > didn't reveal anything, but I'm sure that somewhere emacs must be deciding > to add colors to the output. > --0016e6deddc8a1e18e049a658efc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
It turns out shell.el is deliberately doing this= , as I expected. The regexps they use for the matching are in=A0shell-font-= lock-keywords. They don't work that well (e.g. matching "--whateve= r" in the middle of a line, but not at the beginning) and I find the c= olors distracting, so I just disabled the coloring with=A0(setq shell-font-= lock-keywords nil).

On Sun, Jan= 16, 2011 at 6:11 PM, Steven Thomas <sthomas314@gmail.com> wrote:
I notice that emacs shell-mode colorizes certain strings in the output of a= command you run. For example most (though not all) words starting with - o= r -- get colorized. You can see this if you run emacs --help. I don't s= ee this goofy colorization in term mode or eshell mode.

Can anyone explain what the deal is? A cursory look at the c= ode in shell.el didn't reveal anything, but I'm sure that somewhere= emacs must be deciding to add colors to the output.


--0016e6deddc8a1e18e049a658efc--