diff --git a/matlab.el b/matlab.el
index f41af13..f95dc09 100644
--- a/matlab.el
+++ b/matlab.el
@@ -161,6 +161,15 @@ should be ok."
   :group 'matlab
   :type 'sexp)
 
+(defcustom matlab-align-to-paren t
+  "*Whether continuation lines should be aligned to the opening parenthesis.
+When non-nil, continuation lines are aligned to the opening parenthesis if the
+opening is not followed by only spaces and ellipses.  When nil, continued lines
+are simply indented by `matlab-cont-level'."
+  :group 'matlab
+  :type 'boolean
+  )
+
 (defcustom matlab-indent-function-body 'guess
   "*If non-nil, indent body of function.
 If the global value is nil, do not indent function bodies.
@@ -2502,7 +2511,8 @@ Argument CURRENT-INDENTATION is what the previous line recommends for indentatio
 			       ;; this open paren is there, then we
 			       ;; DONT want to indent to it.  Use the
 			       ;; standard indent.
-			       (if (looking-at "\\.\\.\\.\\|$")
+			       (if (or (not matlab-align-to-paren)
+			               (looking-at "\\.\\.\\.\\|$"))
 				   ;; This could happen in another set
 				   ;; of matricies.  Find a current
 				   ;; indentation based on the
Hi all,

I am not sure this is the right place to submit patches, so please let
me know if this should be submitted through another channel.

The attached patch adds an option to matlab.el to align continuation
lines after opening parentheses with a single indent instead of aligning
to the open parenthesis.

E.g.:

  func_call(var1, ...
      var2);

instead of

  func_call(var1, ...
            var2);

Does this look like something that could be merged?  If so, please let
me know if changes to the patch are required.

Thanks,

thibault
------------------------------------------------------------------------------
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

Reply via email to