bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#73016: Potential inclusion of kbd-mode, part of kmonad, in Non-GNU E


From: Tony Zorman
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]