GNU bug report logs - #34952
files with/out final newline look the same no matter what

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 23 Mar 2019 05:09:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 34952 <at> debbugs.gnu.org
Subject: bug#34952: files with/out final newline look the same no matter what
Date: Sun, 24 Mar 2019 01:23:20 +0000
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

>   (defun my-hi-lock-no-eof-nl ()
>     "Highlight missing trailing EOF newlines."
>     (setf (alist-get "^.+\\'" hi-lock-interactive-patterns nil nil #'equal)
>           '(0 'trailing-whitespace prepend)))

Oops, you probably don't want to use setf+alist-get here.  Better just:

  (add-to-list 'hi-lock-interactive-patterns
               '("^.+\\'" 0 'trailing-whitespace prepend))

-- 
Basil




This bug report was last modified 4 years and 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.