From: steve-humphreys@gmx.com
To: steve-humphreys@gmx.com
Cc: help-gnu-emacs@gnu.org, moasenwood@zoho.eu
Subject: Re: Highlight tabulated and trailing whitespace
Date: Mon, 28 Dec 2020 14:09:56 +0100 [thread overview]
Message-ID: <trinity-6bd8314d-dfba-4f42-bfad-4997349b0d0d-1609160996356@3c-app-mailcom-bs16> (raw)
In-Reply-To: <trinity-22b1a303-61c6-4cca-871e-fad7bf58f515-1609144805161@3c-app-mailcom-bs16>
I cannot understand why the following code is giving me a lisp error.
(defun display-cycle ()
"Toggle Display-Line-Numbers mode in all buffers."
(interactive)
(let ((n display-cycle-state))
(pcase n
(1 (whitespace-mode)
(setq-local display-cycle-state 2))
(2 (ruler-mode 0)
(setq line-number-mode nil)
(setq column-number-mode nil)
(global-display-line-numbers-mode)
(setq-local display-cycle-state 3))
(_ (ruler-mode 1)
(setq line-number-mode t)
(setq column-number-mode t)
(global-display-line-numbers-mode)
(setq-local display-cycle-state 1))) ))
> Sent: Monday, December 28, 2020 at 2:10 PM
> From: steve-humphreys@gmx.com
> To: moasenwood@zoho.eu
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: Highlight tabulated and trailing whitespace
>
> Have tried the following two lines to no effect
>
> (require 'whitespace)
> (whitespace-mode)
>
> But then if I use "H-k" to toggle, the command works. What is happening???
>
> (global-set-key (kbd "H-k") 'whitespace-mode)
>
>
>
>
> > Sent: Monday, December 28, 2020 at 1:11 PM
> > From: "Emanuel Berg via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> > To: help-gnu-emacs@gnu.org
> > Subject: Re: Highlight tabulated and trailing whitespace
> >
> > steve-humphreys wrote:
> >
> > > I have tried to show tab marks, but the following commands
> > > are confusing me. One can use a backgrouund colour and
> > > introduce a tab mark. But I have no idea how to
> > > achieve them.
> > >
> > > (setq whitespace-style '(face tabs))
> >
> > Then just set the `whitespace-tab' face, to some face other
> > than what the default face has,
> >
> > (insert "\t <-- this is a tab")
> >
> > and enable the mode.
> >
> > --
> > underground experts united
> > http://user.it.uu.se/~embe8573
> > https://dataswamp.org/~incal
> >
> >
> >
>
>
next prev parent reply other threads:[~2020-12-28 13:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 4:11 Highlight tabulated and trailing whitespace steve-humphreys
2020-12-28 4:50 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-28 4:56 ` steve-humphreys
2020-12-28 5:07 ` 2QdxY4RzWzUUiLuE
2020-12-28 5:12 ` steve-humphreys
2020-12-28 6:08 ` steve-humphreys
2020-12-28 7:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-28 8:40 ` steve-humphreys
2020-12-28 10:59 ` Michael Heerdegen
2020-12-28 12:42 ` Óscar Fuentes
2020-12-28 13:09 ` steve-humphreys [this message]
2020-12-28 16:08 ` steve-humphreys
2020-12-28 16:55 ` Drew Adams
2020-12-28 17:06 ` steve-humphreys
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=trinity-6bd8314d-dfba-4f42-bfad-4997349b0d0d-1609160996356@3c-app-mailcom-bs16 \
--to=steve-humphreys@gmx.com \
--cc=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/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).