mathworks / Emacs-MATLAB-Mode

Edit, lint, debug, and run MATLAB in Emacs
GNU General Public License v3.0
9 stars 1 forks source link

matlab-cell doesn't work with Emacs 27 #4

Closed JohnC32 closed 1 month ago

JohnC32 commented 1 month ago

Build using Emacs 27, then load any file.m and you'll see:

File mode specification error: (invalid-function (start-end (matlab-cell-range-function)))

Also the tests don't pass.

For now, I'll disable matlab-cell in matlab.el for Emacs 27, but it would be good to fix this.

Nidish96 commented 1 month ago

I just tried this with a fresh install of emacs 27.2 on Ubuntu 24.04 and am unable to reproduce this error. Here's a video of me using it on emacs 27.2. Screencast from 2024-10-22 12-23-52.webm

Could you provide some more details?

JohnC32 commented 1 month ago

The error showed up in the tests (make EMACS=/path/to/emacs27/bin/emacs). It was due to the fact that we start emacs in minimal mode (-Q) which means subr-x wasn't required and thus if-let causes the invalid-function. I fixed this by adding (require 'subr-x).

See commit 0d431b5