*** matlab.el.~1.40.~	2013-08-22 08:48:51.000000000 -0400
--- matlab.el	2014-09-19 12:36:15.778112000 -0400
***************
*** 1059,1065 ****
     '("^\\(Error in\\|Syntax error in\\)\\s-+==>\\s-+\\(.+\\)$"
       (1 font-lock-comment-face) (2 font-lock-string-face))
     ;; and line numbers
!    '("^\\(On line [0-9]+\\)" 1 font-lock-comment-face)
     ;; User beep things
     '("\\(\\?\\?\\?[^\n]+\\)" 1 font-lock-comment-face)
     ;; Useful user commands, but not useful programming constructs
--- 1059,1065 ----
     '("^\\(Error in\\|Syntax error in\\)\\s-+==>\\s-+\\(.+\\)$"
       (1 font-lock-comment-face) (2 font-lock-string-face))
     ;; and line numbers
!    '("^\\(\\(On \\)?line [0-9]+\\)" 1 font-lock-comment-face)
     ;; User beep things
     '("\\(\\?\\?\\?[^\n]+\\)" 1 font-lock-comment-face)
     ;; Useful user commands, but not useful programming constructs
***************
*** 4613,4622 ****
  ;; Syntax:  Syntax error in ==> <filename>
  ;;          On line # ==> <sample-text>
  ;; Warning: In <filename> at line # <stuff>
  (defvar gud-matlab-error-regexp
!   (concat "\\(Error \\(?:in\\|using\\) ==>\\|Syntax error in ==>\\|In\\) "
! 	  "\\([-@.a-zA-Z_0-9/ \\\\:]+\\)\\(?:>[^ ]+\\)?.*[\n ]\\(?:On\\|at\\)\\(?: line\\)? "
! 	  "\\([0-9]+\\) ?")
    "Regular expression finding where an error occurred.")
  
  (defvar matlab-shell-last-error-anchor nil
--- 4618,4636 ----
  ;; Syntax:  Syntax error in ==> <filename>
  ;;          On line # ==> <sample-text>
  ;; Warning: In <filename> at line # <stuff>
+ ;;
+ ;; New Error Formats:
+ ;; Errors:  Error in <function name> (line <#>)
  (defvar gud-matlab-error-regexp
!   (if t
!       (concat "\\(Error \\(?:in\\|using\\)\\|Syntax error in\\) "
!               "\\([-@.a-zA-Z_0-9/\\\\:]+\\)[\n ]*(line "
!               "\\([0-9]+\\)) ?")
!     ;; else
!     (concat "\\(Error \\(?:in\\|using\\) ==>\\|Syntax error in ==>\\|In\\) "
!             "\\([-@.a-zA-Z_0-9/ \\\\:]+\\)\\(?:>[^ ]+\\)?.*[\n ]\\(?:On\\|at\\)\\(?: line\\)? "
!             "\\([0-9]+\\) ?")
!     ) ;; end if
    "Regular expression finding where an error occurred.")
  
  (defvar matlab-shell-last-error-anchor nil
