emacs-devel
[Top][All Lists]
Advanced

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

Sv: Christmas wish: Literate Elisp


From: arthur miller
Subject: Sv: Christmas wish: Literate Elisp
Date: Sat, 14 Dec 2019 05:05:13 +0000

"The idea sounds basically plausible, but note that simply rejecting
all lines that start with anything other than ( plus whitespace
will give the wrong results.  Lisp code includes lines that start
with other things.  Look at any file of Lisp code and you will see
many that start with letters, digits or quotes.  The proposal
needs to be corrected for this."

To be honest I am not sure if I am a bit not understood here, or just
me not being knowledgable enough about lisp (could be both 🙂). I
will try to clarify.

What I propose is to treat lines that does not belong to a code block ().
I don't mean every line that does not start with '('. there can be many
lines in a code block between an '(' and final matching ')'. Once '(' is
encountered, parsing should be just as it is now, without difference.
';' would still be the comment indicator, so no change needed there.
Just for the text that does not belong to any matching pair of (), so to
say in-between "block final"  ')' and "block opening"  '('. I am sorry if
my terminology is not very lisp-like, I am used to think more in terms
of a C compiler.

I am not super-versatile with elisp to be honest, so I will have to
ask: is it possible to have elisp that isn't in-between '(' and ')'.
Is it possible to have symbols or literals in elisp outside ()? I
am sorry if I am total noob, but I am not used to see those in
sources, is it just rare to have them, or do I missunderand? I am
looking around in some elisp but I can't find any.


Från: Richard Stallman <address@hidden>
Skickat: den 14 december 2019 05:16
Till: arthur miller <address@hidden>
Kopia: address@hidden <address@hidden>
Ämne: Re: Christmas wish: Literate Elisp
 
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

The idea sounds basically plausible, but note that simply rejecting
all lines that start with anything other than ( plus whitespace
will give the wrong results.  Lisp code includes lines that start
with other things.  Look at any file of Lisp code and you will see
many that start with letters, digits or quotes.  The proposal
needs to be corrected for this.

But I think that correction won't be difficult.

Indented comments should be recognized and formatted differently
but not exactly the same as interpolated text.

Perhaps triple-semicolon should be the marker for interpolated text.
That way, it would not require any change in Lisp parsing or in Lisp Mode.

--
Dr Richard Stallman
Founder, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)



reply via email to

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