[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modify text appearance (put spaces after commas just for display)
From: |
Emanuel Berg |
Subject: |
Re: Modify text appearance (put spaces after commas just for display) |
Date: |
Tue, 26 Sep 2017 11:28:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Alberto Luaces wrote:
> Hello, I have some inherited code where the
> style used was to squeeze every single
> non-required white-space. There are long
> lists of comma-separated values with any
> spaces on them, rendering the code very
> difficult to read.
>
> I wanted to have something like glasses-mode,
> but unless I am mistaken, it is not very
> configurable, so I cannot add new cases as
> commas separated by spaces, which is mine.
>
> Then I thought of overlays, but the manual
> says that if there are a big number of
> substitutions, maybe it could be a better
> idea to use text properties instead.
>
> So, from the top of your head, what would be
> the less painful method to change every comma
> to a comma+space, or at least change the
> color of the commas to anything more
> distinguishable and attach it to the language
> mode hook?
... you mean in code that is already written?
Do it by hand, or use `replace-regexp'.
(replace-regexp "," ", ")
--
underground experts united
http://user.it.uu.se/~embe8573
- Modify text appearance (put spaces after commas just for display), Alberto Luaces, 2017/09/26
- Re: Modify text appearance (put spaces after commas just for display),
Emanuel Berg <=
- Re: Modify text appearance (put spaces after commas just for display), Alberto Luaces, 2017/09/26
- Re: Modify text appearance (put spaces after commas just for display), tomas, 2017/09/26
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/26
- Re: Modify text appearance (put spaces after commas just for display), tomas, 2017/09/26
- Re: Modify text appearance (put spaces after commas just for display), Alberto Luaces, 2017/09/26
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/26
- Re: Modify text appearance (put spaces after commas just for display), Marcin Borkowski, 2017/09/27
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/27
- Re: Modify text appearance (put spaces after commas just for display), tomas, 2017/09/27
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/27