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


Message #51 received at 34952 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 34952 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, jidanni <at> jidanni.org
Subject: Re: bug#34952: files with/out final newline look the same no matter
 what
Date: Sat, 08 Aug 2020 11:47:05 +0200
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Isn't it possible to just copy what whitespace-trailing-regexp is doing?
> I.e. use a function instead of a regexp?  (I don't think the regexp
> construct \= would help much here.)

\=
    matches the empty string, but only at point.

Heh, I didn't even know about that one...

Ah, yeah:

(defvar whitespace-point (point)
  "Used to save locally current point value.
Used by function `whitespace-trailing-regexp' (which see).")

So that's basically the same problem I'm having here, and it's solved by
machinery that keeps that variable updated in whitespace buffers,
probably because font-lock doesn't provide that information?

>> By the way, have I whined about how difficult debugging font-lock stuff
>> is?  I can't put a `debug' in there, for instance, to examine the
>> calling sequence, which would probably tell me what I need to know.
>
> Would font-lock-studio help?  (I haven't tried it.)
> https://github.com/Lindydancer/font-lock-studio

Interesting...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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.