[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modify text appearance (put spaces after commas just for display)
From: |
Yuri Khan |
Subject: |
Re: Modify text appearance (put spaces after commas just for display) |
Date: |
Tue, 26 Sep 2017 17:00:27 +0700 |
On Tue, Sep 26, 2017 at 4:12 PM, Alberto Luaces <aluaces@udc.es> wrote:
> 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?
One imperfect approximation would be to use prettify-symbols-mode.
$ emacs -Q
(add-to-list 'prettify-symbols-alist '("," . (?, (Br . Bl) ?\s)))
M-x prettify-symbols-mode RET
Limitations:
* Does not act on commas in comments or string literals.
* If a comma is followed by a space, you will see two spaces.
If you want to overcome these, you will either want to write some
custom predicates for prettify-symbols-mode, or dive a layer down and
work with ‘font-lock-add-keywords’ directly.
- Re: Modify text appearance (put spaces after commas just for display), (continued)
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/28
- Re: Modify text appearance (put spaces after commas just for display), tomas, 2017/09/28
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/29
- Re: Modify text appearance (put spaces after commas just for display), tomas, 2017/09/29
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/29
- Re: Modify text appearance (put spaces after commas just for display), tomas, 2017/09/29
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/29
- Re: Modify text appearance (put spaces after commas just for display), Kendall Shaw, 2017/09/28
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/29
- Re: Modify text appearance (put spaces after commas just for display), Emanuel Berg, 2017/09/28
Re: Modify text appearance (put spaces after commas just for display),
Yuri Khan <=
Re: Modify text appearance (put spaces after commas just for display), Nick Helm, 2017/09/26
Re: Modify text appearance (put spaces after commas just for display), Sivaram Neelakantan, 2017/09/26
Re: Modify text appearance (put spaces after commas just for display), Eli Zaretskii, 2017/09/29