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: Disabling show-wspace for a specific mode or buffer Date: Wed, 27 Jun 2012 14:16:29 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340831805 18515 80.91.229.3 (27 Jun 2012 21:16:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2012 21:16:45 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "'Valera Rozuvan'" , "'Alp Aker'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 27 23:16:44 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SjzbP-0004X1-By for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jun 2012 23:16:43 +0200 Original-Received: from localhost ([::1]:56860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjzbO-0000Q3-Sg for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jun 2012 17:16:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjzbJ-0000Pk-R2 for help-gnu-emacs@gnu.org; Wed, 27 Jun 2012 17:16:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SjzbI-0007TX-1W for help-gnu-emacs@gnu.org; Wed, 27 Jun 2012 17:16:37 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:21875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjzbH-0007SN-R4 for help-gnu-emacs@gnu.org; Wed, 27 Jun 2012 17:16:35 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5RLGWag000438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 27 Jun 2012 21:16:33 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5RLGVR6021372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Jun 2012 21:16:31 GMT Original-Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5RLGVLh020638; Wed, 27 Jun 2012 16:16:31 -0500 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 27 Jun 2012 14:16:31 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac1Up0SNyte46g39SjqG2laSh9CcngAAG3Tg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85538 Archived-At: > (global-set-key (kbd "") > 'show-ws-dont-highlight-trailing-whitespace) > (global-set-key (kbd "") 'show-ws-highlight-trailing-whitespace) > > Now when I press F11 - the highlighting is turned off (F12 turns it > back on). I believe that this approach is the best for me because I > don't have to hard code into ~/.emacs the modes for which I want to > disable the highlighting functionality. I thought you wanted to leave it off for specific modes (you mentioned w3m), which is what my suggestion does. If instead you just want to hit a key to turn it on/off, all you need to do is bind `show-ws-toggle-show-trailing-whitespace' to a (single) key - that's what it's for: (global-set-key (kbd "") 'show-ws-toggle-show-trailing-whitespace)