*** matlab.el.~1.40.~	Thu Aug 22 08:48:51 2013
--- matlab.el	Wed Aug 20 15:32:31 2014
***************
*** 2719,2729 ****
  	 (skip-chars-forward " \t%"))
  	((matlab-lattr-comm)		; code line w/ comment
  	 (beginning-of-line)
! 	 (re-search-forward "[^%]%[ \t]")
! 	 (forward-char -2)
  	 (if (> (current-column) comment-column) (delete-horizontal-space))
  	 (if (< (current-column) comment-column) (indent-to comment-column))
! 	 (skip-chars-forward "% \t"))
  	(t				; code line w/o comment
  	 (end-of-line)
  	 (re-search-backward "[^ \t\n^]" 0 t)
--- 2719,2734 ----
  	 (skip-chars-forward " \t%"))
  	((matlab-lattr-comm)		; code line w/ comment
  	 (beginning-of-line)
! 	 (re-search-forward "[^%]\\(%\\)[ \t]")
! 	 (goto-char (match-beginning 1))
  	 (if (> (current-column) comment-column) (delete-horizontal-space))
  	 (if (< (current-column) comment-column) (indent-to comment-column))
!          ;; Now see if the current line is too long to fit.  Can we backdent?
!          (let ((eol-col (- (point-at-eol) (point-at-bol))))
!            (when (> eol-col fill-column)
!              (delete-horizontal-space)
!              (indent-to (- comment-column (- eol-col fill-column)))))
!          (skip-chars-forward "% \t"))
  	(t				; code line w/o comment
  	 (end-of-line)
  	 (re-search-backward "[^ \t\n^]" 0 t)
