From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Tennis Smith" Newsgroups: gmane.emacs.help Subject: RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace" Date: Sun, 30 Dec 2007 14:33:15 -0800 Message-ID: <001301c84b33$f8e917e0$eabb47a0$@com> References: <51f22e83-7a41-4239-abce-3bf782e96264@d21g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199109050 11023 80.91.229.12 (31 Dec 2007 13:50:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Dec 2007 13:50:50 +0000 (UTC) To: "'Drew Adams'" , "'gamename'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 31 14:51:02 2007 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 1J9L2k-0004XW-3b for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Dec 2007 14:51:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J9L2O-0003OQ-HW for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Dec 2007 08:50:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J96lH-00065K-Cr for help-gnu-emacs@gnu.org; Sun, 30 Dec 2007 17:36:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J96lF-000654-V9 for help-gnu-emacs@gnu.org; Sun, 30 Dec 2007 17:36:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J96lF-000651-Px for help-gnu-emacs@gnu.org; Sun, 30 Dec 2007 17:36:01 -0500 Original-Received: from smtp116.plus.mail.sp1.yahoo.com ([69.147.95.79]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1J96lF-0002z5-Fi for help-gnu-emacs@gnu.org; Sun, 30 Dec 2007 17:36:01 -0500 Original-Received: (qmail 84790 invoked from network); 30 Dec 2007 22:35:59 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=mG1N9YeC3GmPR/9B/MqWOY38Gnz/sqZDwEG8MwD4vpiSy3GGXKQUs9brSROBiPqzgD29tFIkTn4sTZGznyK/69gfRryErIDja/3vR/+33BueZKN27/hMxZnwuGXksgM4VIwpSpeiXie+YJnRJ1FaI+TKOeIRMMiBKE8hSv8pnJI= ; Original-Received: from unknown (HELO tennisdt) (tennis_smith@76.222.192.62 with login) by smtp116.plus.mail.sp1.yahoo.com with SMTP; 30 Dec 2007 22:35:59 -0000 X-YMail-OSG: m9A34u4VM1mkPh_xbymxfg8_BxD74wZ95hgQhfCjfuGvXghJESHzGaWFHuBsk9cv4zEP_.L7KH4tVcrPmR065EY8 In-Reply-To: X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AchLLKbZqOj0JeySR3exyXJ9YOc1LgAByGjQ Content-Language: en-us X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-Mailman-Approved-At: Mon, 31 Dec 2007 08:50:06 -0500 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:50400 Archived-At: PS ... In case you haven't seen this: https://sourceforge.net/projects/emacswikicode -----Original Message----- From: Drew Adams [mailto:drew.adams@oracle.com] Sent: Sunday, December 30, 2007 1:40 PM To: gamename; help-gnu-emacs@gnu.org Subject: RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace" > How can I turn on "show-ws-highlight-trailing-whitespace" for every > buffer *except* shell buffers? Inside source code files its great, but > in a shell buffer its just an annoyance. Hi Tennis, Perhaps something like this (untested): (add-hook 'after-change-major-mode-hook (lambda () (unless (eq major-mode 'shell-mode) (show-ws-highlight-trailing-whitespace)))) Or, if there are several modes that use shell buffers, then use `memq' instead of `eq'. Or, turn it on globally and then turn it off in shell mode with `shell-mode-hook'. Or... BTW, although I'm the maintainer of show-ws.el, I recommend you also take a look at Vinicius Jose Latorre's blank-mode.el: http://www.emacswiki.org/cgi-bin/wiki/bookmark%2B.el/DrewAdams/ShowWhiteSpac e. HTH - Drew