From: Yuri Khan <yuri.v.khan@gmail.com>
To: egarrulo <egarrulo@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Highlighting a missing final newline?
Date: Tue, 22 Mar 2016 17:50:25 +0600 [thread overview]
Message-ID: <CAP_d_8UD5FSyn1dDXW7-_0HiH5vzMkb4GWd6s5BkCGWoOyBNbw@mail.gmail.com> (raw)
In-Reply-To: <dlcon6FtmquU1@mid.individual.net>
On Tue, Mar 22, 2016 at 5:30 PM, egarrulo <egarrulo@gmail.com> wrote:
> 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.
>
> Thank you.
Maybe highlight the last character which is not newline and is
immediately followed by the end of buffer, by regexp ".\'"?
next prev parent reply other threads:[~2016-03-22 11:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 11:30 Highlighting a missing final newline? egarrulo
2016-03-22 11:50 ` Yuri Khan [this message]
2016-03-22 13:37 ` egarrulo
2016-03-22 13:49 ` Drew Adams
[not found] ` <mailman.8110.1458654604.843.help-gnu-emacs@gnu.org>
2016-03-22 13:54 ` egarrulo
2016-03-22 13:57 ` Óscar Fuentes
2016-03-22 16:21 ` Eli Zaretskii
[not found] ` <mailman.8133.1458663736.843.help-gnu-emacs@gnu.org>
2016-03-22 16:42 ` egarrulo
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP_d_8UD5FSyn1dDXW7-_0HiH5vzMkb4GWd6s5BkCGWoOyBNbw@mail.gmail.com \
--to=yuri.v.khan@gmail.com \
--cc=egarrulo@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.