Macaulay2 / M2-emacs

Macaulay2 emacs files
GNU General Public License v3.0
5 stars 3 forks source link

Restrict infoHelp support to M2-comint-mode #16

Closed d-torrance closed 3 years ago

d-torrance commented 3 years ago

Partially fixes Macaulay2/M2#1805

mahrud commented 3 years ago

Both this and #1806 look good to me. I'll leave it to Dan to decide when they should be merged.

DanGrayson commented 3 years ago

I think a better way to do this would be to make comint-output-filter-functions a buffer-local variable in M2-comint-mode

d-torrance commented 3 years ago

I think a better way to do this would be to make comint-output-filter-functions a buffer-local variable in M2-comint-mode

Yeah, that's much nicer! I've just force-pushed a new version of the commit doing exactly that.

DanGrayson commented 3 years ago

I don't see a line in the diff where you make it a buffer-local variable ...

d-torrance commented 3 years ago

I don't see a line in the diff where you make it a buffer-local variable ...

It's the final t in the call to add-hook. From M-x describe-function add-hook:

The optional fourth argument, LOCAL, if non-nil, says to modify the hook’s buffer-local value rather than its global value. This makes the hook buffer-local, and it makes t a member of the buffer-local value. That acts as a flag to run the hook functions of the global value as well as in the local value.

DanGrayson commented 3 years ago

Okay, thanks!

DanGrayson commented 3 years ago

Now I suppose I can expect a pull request for M2 updating the corresponding submodule.

d-torrance commented 3 years ago

Now I suppose I can expect a pull request for M2 updating the corresponding submodule.

Done -- I tacked it onto https://github.com/Macaulay2/M2/pull/1806 since it's already infoHelp-related.