help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace"


From: Drew Adams
Subject: RE: Selectively Turning Off "show-ws-highlight-trailing-whitespace"
Date: Sun, 30 Dec 2007 13:40:15 -0800

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]