unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Valera Rozuvan'" <valera.rozuvan@gmail.com>,
	"'Alp Aker'" <alptekin.aker@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Disabling show-wspace for a specific mode or buffer
Date: Wed, 27 Jun 2012 14:16:29 -0700	[thread overview]
Message-ID: <F7282534BC464BFB96D3B7770D180563@us.oracle.com> (raw)
In-Reply-To: <CAM8kQFyV35OEdToSpGa5wshFn6T=vkagXeQi7r-pKXMYCsoneQ@mail.gmail.com>

> (global-set-key (kbd "<f11>") 
> 'show-ws-dont-highlight-trailing-whitespace)
> (global-set-key (kbd "<f12>") '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 "<f11>")
                'show-ws-toggle-show-trailing-whitespace)




  reply	other threads:[~2012-06-27 21:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 18:27 Disabling show-wspace for a specific mode or buffer Valera Rozuvan
2012-06-27 20:01 ` Alp Aker
2012-06-27 20:10   ` Valera Rozuvan
2012-06-27 20:31     ` Alp Aker
2012-06-27 20:41       ` Alp Aker
2012-06-27 20:56         ` Valera Rozuvan
2012-06-27 21:16           ` Drew Adams [this message]
2012-06-27 21:45             ` Valera Rozuvan
2012-06-27 22:12               ` Drew Adams
2012-06-27 20:27 ` Drew Adams
     [not found] ` <mailman.3588.1340828845.855.help-gnu-emacs@gnu.org>
2012-06-27 22:23   ` Michael Heerdegen
2012-06-28  2:11 ` John Wiegley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F7282534BC464BFB96D3B7770D180563@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=alptekin.aker@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=valera.rozuvan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).