Eric Ludlam writes:
> Hi,
>
> I would guess that 'end' indentation is not really the last hurdle. For TABs
> to work, all places where character math occur will need to be replaced with
> calls to 'current-column'.
>
> Ie - instead of
>
> (- match (match-beginning 0))
>
> You would need
>
> (- match-col (save-excursion (goto-char (match-beginning 0)) (current-column))
>
> Current-column is used in a bunch of places already, so hopefully the number
> of problem areas is small.
>
> Eric
>
Thanks for the guidance.
I modified the patch to use (current-column) as advised. Could you
please let me know if this is what you had in mind?
I understand that there may be other places where a similar change
should be done, but tabs seem to be working fine for me at this point: I
haven't found any indentation problems after fixing the 'end' line. If
other issues arise, I can try to have a look.
diff --git a/matlab.el b/matlab.el
index 33835c3..a856a3d 100644
--- a/matlab.el
+++ b/matlab.el
@@ -2391,7 +2391,16 @@ Argument CURRENT-INDENTATION is what the previous line recommends for indentatio
(beginning-of-line)
(looking-at "[ \t]*")
(when (= match (match-end 0))
- (setq ci (- match (match-beginning 0)))
+ (let ((match-col-end
+ (save-excursion
+ (goto-char match)
+ (current-column)))
+ (match-col-beginning
+ (save-excursion
+ (goto-char (match-beginning 0))
+ (current-column)))
+ )
+ (setq ci (- match-col-end match-col-beginning)))
(throw 'indent nil)))))
;; End of special case for end and match after "^[ \t]*".
(setq ci (+ ci
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss