|Subject:||Sv: Christmas wish: Literate Elisp|
|Date:||Fri, 20 Dec 2019 00:55:29 +0000|
Here is a little prototype to test my idea with literal Elisp.
I have patched read-eval loop as stated in previous mail, in lread.c.
It is probably possible to implement that in Elisp, but I don't have
enough knowledge of either Emacs internals nor Elisp to do this in some
short time. It would took me a lot of time to look up all the
things I would need. Anyway, C code turned to be rather trivial, and also
completely by-passable if so desired, so I have introduced a user-customizable
variable 'emacs-lisp-allow-literal-comments', which is by default nil.
I wasn't sure in which elisp file to introduce this variable, so I have used
'simple.el' found in lisp directory of Emacs source distribution. That file
seems to have some other user customizable variables that affect elisp so I
thought it might be appropriate place.
For the byte compiler I have patched bytecomp.el, in rather brutish way, but it
seems to work. It wasn't very difficult either, but I think I have done it rather
ugly. Someone might wish to refactor that code. Anyway, it is less then
twenty lines of code, and it is by default bypassed as well. The variable
that controls it is also user customizable and found in same file,
I have attached also a small trivial elisp file for illustration purpose.
It is just a test of an idea, and small prototype to show that it might work.
It needs more thorough testing and can probably be implemented in some better
I have tested on GNU/Linux and Windows. Emacs was able to compile it's own
elisp as well as external packages I use.
As a note, the change in C is completely backwards compatible. No logical
change to elisp parser happens when 'emacs-lisp-allow-literal-comments'
variable is nil.
Från: Emacs-devel <emacs-devel-bounces+arthur.miller=address@hidden> för Jean-Christophe Helary <address@hidden>
Skickat: den 19 december 2019 02:50
Till: address@hidden <address@hidden>
Ämne: Re: Christmas wish: Literate Elisp
> On Dec 19, 2019, at 9:42, chad <address@hidden> wrote:
> There is a large body of existing software which will be totally unaware of your changes.
Although I think the premise of your comment is absolutely valid, I'm not so sure about the "*large* body of existing software".
|[Prev in Thread]||Current Thread||[Next in Thread]|