From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alp Aker Newsgroups: gmane.emacs.help Subject: Re: Disabling show-wspace for a specific mode or buffer Date: Wed, 27 Jun 2012 16:31:36 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1340829111 29792 80.91.229.3 (27 Jun 2012 20:31:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2012 20:31:51 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Valera Rozuvan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 27 22:31:50 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 1Sjytu-0006OY-LL for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jun 2012 22:31:46 +0200 Original-Received: from localhost ([::1]:42368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sjytu-00086D-I7 for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jun 2012 16:31:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sjyto-00085z-KE for help-gnu-emacs@gnu.org; Wed, 27 Jun 2012 16:31:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sjytm-0007rA-V8 for help-gnu-emacs@gnu.org; Wed, 27 Jun 2012 16:31:40 -0400 Original-Received: from mail-gg0-f169.google.com ([209.85.161.169]:62879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sjytm-0007ql-Np for help-gnu-emacs@gnu.org; Wed, 27 Jun 2012 16:31:38 -0400 Original-Received: by ggm4 with SMTP id 4so1538147ggm.0 for ; Wed, 27 Jun 2012 13:31:37 -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; bh=n88oJUgO6Zi9RoGNgpkk6WSs1VU1hqtdjaSHDBbMezg=; b=WeSXvAleKhMdpOEeOQRMCvFyiXqg/K2lqsVMZX1NxJhE5uD2e5pAGw2J/cJs5y72Bd 6k8i0GITufs4mRY4jhXeW/wr/emdiovQE1tDk95/3UwQn1d2WbBs9ZiQhmJDDhIrijWL sGZ3Zo0KOtvbW7VlnNDnjcmBzFP+dYuuHnljm0x6UB/DOlKPCCgzkVD22lopF/u3UDFl 3zB/TUfSG+tpwj+9vYNS4HcH3H7spV7EeUjJheH6lPDzZ/PGiCAQSAdXufWD40I1Q53j Coggz2t5xKbfX7MPJXN6pHERBI4N6RoWJSfkIMzaHtPAej0bYhKKZ6kxSC6X2/hVqgPl wJ4w== Original-Received: by 10.50.178.102 with SMTP id cx6mr2672788igc.14.1340829096876; Wed, 27 Jun 2012 13:31:36 -0700 (PDT) Original-Received: by 10.64.129.163 with HTTP; Wed, 27 Jun 2012 13:31:36 -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:85535 Archived-At: > I added your add-hook statements, restarted emacs, but when I open w3m > they appear to have no effect. Did you add them to your .emacs *after* you load w3? You could also try this (it's overkill, but might work): (add-hook 'w3m-fontify-before-hook 'show-ws-dont-highlight-trailing-whitespace) Again, this is untested, as w3m breaks my setup, so I'm just looking at the sources. > Also when I run the command > > M-x show-ws-dont-highlight-trailing-whitespace > > Nothing happens, and "[No match]" is inserted at the end of the mini buffer. Correct: show-ws-dont-highlight-trailing-whitespace is not an interactive command, so you can't invoke it that way. You could redefine it by placing the following in your .emacs (after you load show-wspace): (defun show-ws-dont-highlight-trailing-whitespace () "Don't highlight whitespace characters at line ends." (interactive) (when (fboundp 'font-lock-remove-keywords) (font-lock-remove-keywords nil '(("[\240\040\t]+$" (0 'show-ws-trailing-whitespace t))))) (when (called-interactively-p 'any) (font-lock-fontify-buffer))) and then it can be invoked via M-x show-ws-dont-highlight-trailing-whitespace