From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Valera Rozuvan Newsgroups: gmane.emacs.help Subject: Re: Disabling show-wspace for a specific mode or buffer Date: Thu, 28 Jun 2012 00:45:39 +0300 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1340833557 31758 80.91.229.3 (27 Jun 2012 21:45:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2012 21:45:57 +0000 (UTC) Cc: Alp Aker , help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 27 23:45:56 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 1Sk03a-0008To-87 for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jun 2012 23:45:50 +0200 Original-Received: from localhost ([::1]:54147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sk03a-0007rx-5a for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jun 2012 17:45:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sk03U-0007rs-Iw for help-gnu-emacs@gnu.org; Wed, 27 Jun 2012 17:45:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sk03S-0008EE-8b for help-gnu-emacs@gnu.org; Wed, 27 Jun 2012 17:45:44 -0400 Original-Received: from mail-gg0-f169.google.com ([209.85.161.169]:56286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sk03R-0008DN-VT for help-gnu-emacs@gnu.org; Wed, 27 Jun 2012 17:45:42 -0400 Original-Received: by ggm4 with SMTP id 4so1599753ggm.0 for ; Wed, 27 Jun 2012 14:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=yiSzD0dKCRAmGFzhYDM2xUleqngERVlG4Tc6WqGK5l4=; b=DD3rWIwwEEh+kRYFzXLPUqF3Cs4yRl/1gKvHvqqC6edPfIwysaujrRb+3Tk7uBZfVZ D/3EvKkRt0OtUG5RnlsGaaNdpKJsxceHIFKLg7DT8njf0cKdIxyEjn+nidhiudk3zxCZ 1gnq2kHYVu2ZvrtPf5+3dfmln4jXFoiSBeVsVDTnXd1ya+hIrYbBhsjYqPuNTyfWf2aZ BDHc49mtta2VgHFT1U6vaJH4g3t5cP6CIaMuLun9owWnE8LuqEmnl8o/nHA2kXybS2iu UYjxOXiMXiRBj/DvKtbnFn11bcCh2wnmUL+ZuctrTZi1shzKMWLM5KlTudGkzxEul9NM bDDA== Original-Received: by 10.50.178.102 with SMTP id cx6mr2715529igc.14.1340833540018; Wed, 27 Jun 2012 14:45:40 -0700 (PDT) Original-Received: by 10.50.23.34 with HTTP; Wed, 27 Jun 2012 14:45:39 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.161.169 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:85540 Archived-At: > I thought you wanted to leave it off for specific modes (you mentioned w3= m), > which is what my suggestion does. I am just experimenting - and for now looking for the best possible solutio= ns. > 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 "") > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'show-ws-toggle-show-trailing-whitespace) Thanks for the suggestion. But the command show-ws-toggle-show-trailing-whitespace initially assumes that the highlighting is OFF. I, on the other hand, from the start turn ON the highlighting everywhere with the command: (add-hook 'font-lock-mode-hook 'show-ws-highlight-trailing-whitespace) So, with your suggestion, I have to press F11 twice to actually tun OFF highlighting. And also I am not sure if show-ws-toggle-show-trailing-whitespace works just with the buffer, or if it is a global toggle. Regards, Valera Rozuvan