Closed d-torrance closed 3 years ago
It's intended to demonstrate M2-mode:
In this section we learn how to use emacs to edit Macaulay2 code. Assuming you have set up your emacs init file as described in "setting up the Macaulay2 emacs interface" when you visit a file whose name ends with .m2 you will see on the mode line the name Macaulay2 in parentheses, indicating that the file is being edited in Macaulay2 mode.
To see how electric parentheses, electric semicolons, and indentation work, move to a blank line of this file and type the following text.
f = () -> ( a := 4; b := {6,7}; a+b)
Ah, that makes perfect sense!
Closing.
The two documentation files generated by
make-M2-emacs-help.m2
have different file extensions:M2-emacs.m2
M2-emacs-help.txt
Both are plain text files, so
.txt
seems more appropriate, especially as.m2
files usually contain Macaulay2 source.