From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rob Riepel Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: incomplete comment colorization in terminals Date: Fri, 14 Mar 2008 17:49:59 -0700 Message-ID: References: <20080311231514.B718249C0BB@daedalus.stanford.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1205551738 5970 80.91.229.12 (15 Mar 2008 03:28:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Mar 2008 03:28:58 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Eli Zaretskii , Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 15 04:29:25 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JaN5G-0001n5-E2 for ged-emacs-devel@m.gmane.org; Sat, 15 Mar 2008 04:29:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaN4h-0004uJ-5V for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 23:28:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JaKbC-0000AA-Qr for emacs-devel@gnu.org; Fri, 14 Mar 2008 20:50:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JaKbB-00008f-S4 for emacs-devel@gnu.org; Fri, 14 Mar 2008 20:50:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaKbB-00008U-ME for emacs-devel@gnu.org; Fri, 14 Mar 2008 20:50:09 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JaKbB-0002gv-JB for emacs-devel@gnu.org; Fri, 14 Mar 2008 20:50:09 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JaKbB-0007VA-4L for emacs-pretest-bug@gnu.org; Fri, 14 Mar 2008 20:50:09 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JaKb8-0002gL-AS for emacs-pretest-bug@gnu.org; Fri, 14 Mar 2008 20:50:09 -0400 Original-Received: from smtp2.stanford.edu ([171.67.20.25]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JaKb4-0002fE-EK; Fri, 14 Mar 2008 20:50:02 -0400 Original-Received: from smtp2.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id ACE7365B6AA; Fri, 14 Mar 2008 17:50:00 -0700 (PDT) Original-Received: from [171.64.20.40] (noxzema.Stanford.EDU [171.64.20.40]) by smtp2.stanford.edu (Postfix) with ESMTP id 70D9665B68B; Fri, 14 Mar 2008 17:50:00 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.753) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 14 Mar 2008 23:10:38 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92647 gmane.emacs.pretest.bugs:21586 Archived-At: On Mar 11, 2008, at 9:26 PM, Eli Zaretskii wrote: >> From: Rob Riepel >> Date: Tue, 11 Mar 2008 16:15:14 -0700 (PDT) >> >> When using font-locking in a terminal window (xterm and the like) >> single-line comments are only highlighted to the first non-space >> character after a space. This happens in more than one language- >> specific mode - I've tried Emacs-lisp and CPerl modes. >> >> The bug does not occur when running Emacs under X, only in a >> terminal, and only for certain terminal types. The bug is present >> when TERM is >> set to xterm or xterm-color, but not when TERM is set to >> xterm-16color. > > This is not a bug, but a deliberate feature. There's a new face > named font-lock-comment-delimiter-face. And On Mar 11, 2008, at 9:45 PM, Dan Nicolaescu wrote: > A good way to avoid this, and the recommended way run emacs in a > terminal emulator, is to set TERM to xterm-256color. All current > xterm compatible terminal emulators support 256 colors, when using > that your colors will look almost the same in the terminal as the > do in X. Thank you, Eli and Dan, for educating me. I thought I had read NEWS, but apparently not. :-( Many of the debian systems I work on lack the ncurses-term package, so I often cannot set TERM to xterm-256color or even xterm-16color. So even though the terminals I use support 16 or more colors I'm often limited to xterm-color (from the debian ncurses-base package). So I've resorted to this: (and (boundp 'font-lock-comment-delimiter-face) (set-face-attribute 'font-lock-comment-face t :inherit font-lock-comment-delimiter-face)) I really like the color schemes that come with 16+ color support, but there's no "mode" value for --color=mode that sets anything above 8. Is there a way to set the number of colors that can be displayed in .emacs? -- Rob Riepel (650) 725-7577 http://geek.stanford.edu