From: "Drew Adams" <drew.adams@oracle.com>
To: "gamename" <namesagame-usenet@yahoo.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace"
Date: Sun, 30 Dec 2007 13:40:15 -0800 [thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICMEFMECAA.drew.adams@oracle.com> (raw)
In-Reply-To: <51f22e83-7a41-4239-abce-3bf782e96264@d21g2000prf.googlegroups.com>
> 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
next prev parent reply other threads:[~2007-12-30 21:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-30 20:23 Selectively Turning Off "show-ws-highlight-trailing-whitespace" gamename
2007-12-30 21:40 ` Drew Adams [this message]
2007-12-30 22:33 ` Tennis Smith
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DNEMKBNJBGPAOPIJOOICMEFMECAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=namesagame-usenet@yahoo.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.