[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace"
From: |
Tennis Smith |
Subject: |
RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace" |
Date: |
Sun, 30 Dec 2007 14:33:15 -0800 |
PS ...
In case you haven't seen this:
https://sourceforge.net/projects/emacswikicode
-----Original Message-----
From: Drew Adams [mailto:drew.adams@oracle.com]
Sent: Sunday, December 30, 2007 1:40 PM
To: gamename; help-gnu-emacs@gnu.org
Subject: RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace"
> 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