GNU bug report logs - #73016
Potential inclusion of kbd-mode, part of kmonad, in Non-GNU ELPA

Previous Next

Package: emacs;

Reported by: Jeremy Bryant <jb <at> jeremybryant.net>

Date: Tue, 3 Sep 2024 22:21:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Tony Zorman <tonyzorman <at> mailbox.org>
To: Philip Kaludercic <philipk <at> posteo.net>, Jeremy Bryant <jb <at> jeremybryant.net>
Cc: 73016 <at> debbugs.gnu.org
Subject: bug#73016: Potential inclusion of kbd-mode, part of kmonad, in Non-GNU ELPA
Date: Fri, 06 Sep 2024 12:53:53 +0200
Hi,

thanks to Jeremy for submitting this, and to Philip for reviewing! I'm
travelling right now, so I'll keep this short; more to come in a few
days I hope.
 
On Thu, Sep 05 2024 09:53, Philip Kaludercic wrote:
> [… 12 lines elided …]
>
>> On behalf of the author, Tony Zorman, I would like to request
>> consideration to include it in NON-GNU ELPA.
>
> Just for the sake of the protocol, is there a reason against adding the
> package to GNU ELPA?

There has been at least one non-trivial contribution to the package, as
well as several smaller ones. While I have assigned copyright to the FSF
for Emacs and ELPA related things, I don't know whether the same can be
said of the other contributors.

>> The author is conscious that the following snippet should be improved
>> and we are soliciting recommendations on how to improve it.
>>   ;; HACK
>>   (defadvice redisplay (after refresh-font-locking activate)
>>     (when (derived-mode-p 'kbd-mode)
>>       (font-lock-fontify-buffer))))
>
> I agree, we should get rid of that.  But first, what is the intention?
> What breaks if we just remove this advice?

When specifying the keyboard layout, the configuration language accepts
most special symbols verbatim (as in, one can just write @ to have that
symbol bound to a key). This includes " for double quotes, meaning the
highlighting of strings has to be taken care of be the mode—at least, I
think so. This produces inconsistent behaviour that I was never really a
fan of, especially when moving things around. For example, going from 

    (f "string")

to 

    (f
     "string")

would "unhighlight" the string until one refreshes the syntax
highlighting for the buffer via e.g. font-lock-update, or wait until
this happens by itself. The advice is nothing more but a band-aid such
that the latter happens more often.

It may well be that I overlooked something about Emacs's way of going
about string highlighting back when I wrote the mode, and so far I
haven't had the drive to look back into this.

  Tony

-- 
Tony Zorman | https://tony-zorman.com




This bug report was last modified 279 days ago.

Previous Next


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