|
From: Eric L. <el...@ma...> - 2023-07-27 16:23:24
|
For prob2, it looks like when 'matlab-fill-code' is nil, it won't fill the code (via auto-fill mode), and it throws that error.
I pushed a change that will not fill code if matlab-fill-code is nil so it won't error anymore.
Ideally, I suppose you might wan to set matlab-fill-code to t round-about line 2774 if you think it should fill if you specifically ask it to. ie:
(if (= (point)
(progn
(matlab-auto-fill)
(point)))
(error "Fill algorithm failed!"))
Would become
(if (= (point)
(let ((matlab-fill-code t))
(matlab-auto-fill)
(point)))
(error "Fill algorithm failed!"))
In addition to removing the initial check to short-circuit this block.
I remember this going in where the request was to auto-fill comments, but stop auto-filling code since it often didn't do what was desired.
Eric
From: Uwe Brauer <ou...@ma...>
Sent: Thursday, July 27, 2023 11:46 AM
To: Eric Ludlam <el...@ma...>
Cc: Uwe Brauer <ou...@ma...>; Matlab-emacs-discuss <mat...@li...>
Subject: Re: the filling patch and its problems
>>> "EL" == Eric Ludlam <el...@ma...<mailto:el...@ma...>> writes:
> I saw an error indicated in your readme and tried it out. I pushed a
> fix that will improve that particular case. Eric
Thanks I did test it. It is better but still not perfect
1. It does not return error, but
2. it did not change much the filling
(contrary to matlab-fill-comment-line which now works very nicely.
3. I also added a new test file, for which it still returns error.
4. I pushed
Uwe
--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the NATO membership of the Ukraine.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/<https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view>
From: Uwe Brauer <ou...@ma...>
Sent: Thursday, July 27, 2023 11:46 AM
To: Eric Ludlam <el...@ma...>
Cc: Uwe Brauer <ou...@ma...>; Matlab-emacs-discuss <mat...@li...>
Subject: Re: the filling patch and its problems
>>> "EL" == Eric Ludlam <el...@ma...<mailto:el...@ma...>> writes:
> I saw an error indicated in your readme and tried it out. I pushed a
> fix that will improve that particular case. Eric
Thanks I did test it. It is better but still not perfect
1. It does not return error, but
2. it did not change much the filling
(contrary to matlab-fill-comment-line which now works very nicely.
3. I also added a new test file, for which it still returns error.
4. I pushed
Uwe
--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the NATO membership of the Ukraine.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/<https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view>
|