* Selectively Turning Off "show-ws-highlight-trailing-whitespace"
@ 2007-12-30 20:23 gamename
2007-12-30 21:40 ` Drew Adams
0 siblings, 1 reply; 3+ messages in thread
From: gamename @ 2007-12-30 20:23 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
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.
TIA,
-T
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace"
2007-12-30 20:23 Selectively Turning Off "show-ws-highlight-trailing-whitespace" gamename
@ 2007-12-30 21:40 ` Drew Adams
2007-12-30 22:33 ` Tennis Smith
0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2007-12-30 21:40 UTC (permalink / raw)
To: gamename, help-gnu-emacs
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace"
2007-12-30 21:40 ` Drew Adams
@ 2007-12-30 22:33 ` Tennis Smith
0 siblings, 0 replies; 3+ messages in thread
From: Tennis Smith @ 2007-12-30 22:33 UTC (permalink / raw)
To: 'Drew Adams', 'gamename', help-gnu-emacs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-30 22:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-30 20:23 Selectively Turning Off "show-ws-highlight-trailing-whitespace" gamename
2007-12-30 21:40 ` Drew Adams
2007-12-30 22:33 ` Tennis Smith
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).