Subject: bug#76650: 31.0.50; Add lua-mode to Emacs

From: john muhl <[email-masked]>
Date: Thu, 13 Mar 2025 16:50:49 -0500

john muhl <[email-masked]> writes:

> Stefan Kangas <[email-masked]> writes:
>
>> Eli Zaretskii <[email-masked]> writes:
>>
>>>> From: john muhl <[email-masked]>
>>>> Cc: [email-masked], [email-masked], [email-masked]
>>>> Date: Wed, 05 Mar 2025 10:33:20 -0600
>>>>
>>>> Then one last procedural question before I get started on that
>>>> initial commit. Do we want to preserve the git history or just
>>>> bring it in as if it were new file?
>>>
>>> It is best to preserve it.
>>
>> Indeed.  This is one possible starting point:
>> https://gist.github.com/joaotavora/2ed97f2ec85958986983d5cb78202770
>>
>> The idea is to put the changes on a separate branch containing only that
>> one file in its right location, and then to merge that to master.
>
> Ok. I have the history in a branch.
>
> https://git.sr.ht/~johnmuhl/emacs/log/scratch/lua-mode
>
> In the latest commit there I’ve gone through and marked all the
> lines remaining from the inital commit. Please correct me if I’m
> wrong but the only thing that looks possibly significant
> copyright-wise is the function ‘lua-end-of-proc’. Am I too
> optimistic?

To update the progress here. I rewrote the lua-end-of-proc
function and a few other places. That got us down to 160 lines
from the original commit:

https://git.sr.ht/~johnmuhl/emacs/tree/79db03ca/item/lisp/progmodes/lua-mode.el

Going through that and unmarking comments, docstrings and lines of
code that obviously fall short of copyright (e.g. save-excursion,
trivial interactive forms, defuns, &c.) gets down to 28 lines:

https://git.sr.ht/~johnmuhl/emacs/tree/8d44ba06/item/lisp/progmodes/lua-mode.el

(search “; 03e991” to check what’s left)

Of those none of them look to me like they’d qualify as original
or substantial enough to matter.