It turns out that I broke the Macaulay2 demo feature described in the running Macaulay2 in emacs documentation node much earlier than I thought. Way back in #42, I deleted the line that set the current buffer as the demo buffer. So it's been broken since the release of 1.22. Oops!
This PR restores the behavior as described in the documentation and from what I've observed running Macaulay2 1.19.1 in Ubuntu 22.04. However, it's implemented a bit differently.
Previously, this code was just one case inside a much larger M2-send-to-program function, which was bound to F11 in both M2-mode and M2-comint-mode. But since #54, M2-send-to-program is only meant to be called from M2-mode.
Instead, we add a new function that is bound to F11 in M2-comint-mode, namely M2-send-input-or-get-input-from-demo-buffer, which copies a line from the demo buffer if the current line is blank and does the same thing as pressing Return if it isn't.
I just added one related commit. Rather than using a specific large font for the new frame created by M2-demo, we use the 24pt version of the default font.
It turns out that I broke the Macaulay2 demo feature described in the running Macaulay2 in emacs documentation node much earlier than I thought. Way back in #42, I deleted the line that set the current buffer as the demo buffer. So it's been broken since the release of 1.22. Oops!
This PR restores the behavior as described in the documentation and from what I've observed running Macaulay2 1.19.1 in Ubuntu 22.04. However, it's implemented a bit differently.
Previously, this code was just one case inside a much larger
M2-send-to-program
function, which was bound to F11 in bothM2-mode
andM2-comint-mode
. But since #54,M2-send-to-program
is only meant to be called fromM2-mode
.Instead, we add a new function that is bound to F11 in
M2-comint-mode
, namelyM2-send-input-or-get-input-from-demo-buffer
, which copies a line from the demo buffer if the current line is blank and does the same thing as pressing Return if it isn't.