From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace" Date: Sun, 30 Dec 2007 13:40:15 -0800 Message-ID: References: <51f22e83-7a41-4239-abce-3bf782e96264@d21g2000prf.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 1199050877 5981 80.91.229.12 (30 Dec 2007 21:41:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Dec 2007 21:41:17 +0000 (UTC) To: "gamename" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 30 22:41:31 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 1J95uO-0007zH-A9 for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Dec 2007 22:41:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J95u2-0004Oe-Ed for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Dec 2007 16:41:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J95tl-0004O5-Ib for help-gnu-emacs@gnu.org; Sun, 30 Dec 2007 16:40:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J95tk-0004Np-2U for help-gnu-emacs@gnu.org; Sun, 30 Dec 2007 16:40:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J95tj-0004Nm-TY for help-gnu-emacs@gnu.org; Sun, 30 Dec 2007 16:40:43 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J95tj-0002Sa-HT for help-gnu-emacs@gnu.org; Sun, 30 Dec 2007 16:40:43 -0500 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id lBULeepa007100; Sun, 30 Dec 2007 15:40:41 -0600 Original-Received: from rcsmt251.oracle.com (rcsmt251.oracle.com [148.87.90.196]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id lBUK6Iug008942; Sun, 30 Dec 2007 14:40:37 -0700 Original-Received: from dhcp-amer-csvpn-gw2-141-144-72-26.vpn.oracle.com by acsmt350.oracle.com with ESMTP id 3469447251199050796; Sun, 30 Dec 2007 13:39:56 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <51f22e83-7a41-4239-abce-3bf782e96264@d21g2000prf.googlegroups.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:50393 Archived-At: > 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