[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Highlighting a missing final newline?
From: |
Óscar Fuentes |
Subject: |
Re: Highlighting a missing final newline? |
Date: |
Tue, 22 Mar 2016 14:57:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) |
egarrulo <egarrulo@gmail.com> writes:
> How would you highlight a missing final newline? I mean: if a buffer
> lacks a final newline, then you would see a (customizable) character
> at the end of the buffer; otherwise, you would see nothing.
>
> AFAIK, `font-lock-add-keywords' can't help here because there is no
> character to highlight. I have looked into `whitespace-mode' for
> inspiration, but the code is too complex for me.
If your problem consists on editing files that require to end with a
newline, set `require-final-newline' on the mode hook and forget about
that.