From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: egarrulo Newsgroups: gmane.emacs.help Subject: Highlighting a missing final newline? Date: Tue, 22 Mar 2016 12:30:45 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1458646543 22180 80.91.229.3 (22 Mar 2016 11:35:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2016 11:35:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 22 12:35:40 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aiKb6-0000T8-0w for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 12:35:40 +0100 Original-Received: from localhost ([::1]:35450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiKb5-00085q-2E for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 07:35:39 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 9 Original-X-Trace: individual.net FAkbrKiw9mq4vQRMJhcr1wAQLsmy0jHeHKLLkMIg2Y5cL4HPFU Cancel-Lock: sha1:igiWLMf1k/1gANgrxbwsaLl6wZM= X-Mozilla-News-Host: snews://News.Individual.NET:563 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 Original-Xref: usenet.stanford.edu gnu.emacs.help:217355 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109649 Archived-At: 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.