GNU bug report logs - #48180
ruby-mode.el: fix font lock for puts and printf

Previous Next

Package: emacs;

Reported by: Steve Purcell <steve <at> sanityinc.com>

Date: Mon, 3 May 2021 01:02:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Steve Purcell <steve <at> sanityinc.com>, 48180 <at> debbugs.gnu.org
Subject: Re: bug#48180: ruby-mode.el: fix font lock for puts and printf
Date: Mon, 3 May 2021 13:17:48 +0300
Hi Steve,

On 03.05.2021 04:01, Steve Purcell wrote:
> Both these methods can be called without arguments, so the font
> locking of "bare" calls to either is incorrect.  The fix is to
> font-lock them as for other kernel methods which accepts zero or more
> arguments.

Is that important? Like, is anybody likely to call either without args? 
font-lock is not a precise facility (that anything depends on), so we 
can afford to be wrong in 0.01% cases.

If we institute this principle, I suppose we'll need to do this for all 
functions that can work without args? In my testing, that's also:

p, open, loop, warn, print

Also note that your title says 'printf', but the patch said 'print'.




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

Previous Next


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