unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Tennis Smith" <tennis_smith@yahoo.com>
To: "'Drew Adams'" <drew.adams@oracle.com>,
	"'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 14:33:15 -0800	[thread overview]
Message-ID: <001301c84b33$f8e917e0$eabb47a0$@com> (raw)
In-Reply-To: <DNEMKBNJBGPAOPIJOOICMEFMECAA.drew.adams@oracle.com>

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

      reply	other threads:[~2007-12-30 22:33 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
2007-12-30 22:33   ` Tennis Smith [this message]

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='001301c84b33$f8e917e0$eabb47a0$@com' \
    --to=tennis_smith@yahoo.com \
    --cc=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.
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).