I cannot get matlab.el to color comments differently.  Yes, colors do appear:  keywords like "function" are in cyan.  But comments are not colored.  This is very frustrating, and I have wasted hours on it now.  Please help.

-- MajMin7 2013-07-31 01:26 UTC

----

Works for me. I downloaded the tarball, loaded matlab.el, switched my buffer to matlab-mode, and copied some examples from an [http://en.wikibooks.org/wiki/MATLAB_Programming/Comments online book]. Take a look:

http://i.imgur.com/hteEh8Z.png

##M-x describe-text-properties## confirms that `font-lock-comment-face' is being used.

-- AlexSchroeder 2013-08-22 11:22 UTC


----

Thanks for your response.  I tried this.  

M-x describe-text-properties confirms for me that 'font-lock-comment-face' is being used ... 

but my comment color remains green (not red).  How can I set that color to red?

My color scheme is also very different than what you show.  I have cyan keywords, blue function names, and green text on a black background.  Comments are supposed to be red.

I say "supposed to be red" because I resolved this problem on a linux-based machine in my department, where I use red for comments.  I was able to fix it by removing the following line from my .emacs file
(set-background-color "black") 

I have no such line on my OSX emacs.el, and adding it has no effect.  I would greatly appreciate any help!

-- Anonymous 2013-10-08 18:57 UTC


----

Hi Alex, 

I am wondering if you have any suggestion for the problem that is described above.  

Thanks,
-Eric

-- Anonymous 2013-11-27 22:21 UTC


----

I have no idea. You seem to be using a different color theme. Perhaps ##M-x customize-face RET font-lock-comment-face RET## will help? I'm using the standard colors. I'd suggest starting with running emacs -q and emacs -Q to and loading bits and pieces of your init file until you find the statements that make it work -- and the statements that break it.

-- AlexSchroeder 2013-11-27 22:35 UTC


----

Thanks Alex.

-- Anonymous 2013-12-02 14:10 UTC


----

In case anyone else happens to have this problem, I was able to solve it by installing the most recent version of Emacs for Mac.  Thanks again, Alex.

-Eric

-- Anonymous 2013-12-17 16:07 UTC


----

I wanted to stop matlab-mode from starting a new line every time it sends a command to the shell so I changed line 5369 from

`(concat command "\n")`
to
`(concat command "")`

This seems to solve my problem but I'm wondering if there was a reason for the newline and removing it will come back and bite me later.

-Nate

-- Anonymous 2016-08-16 20:00 UTC


----

I did have to change a couple things to get shell completion working better (it completes in the middle of lines without adding empty lines now). The code is available here (https://gitlab.com/nchodosh/matlab-emacs). It also adds two functions:
matlab-insert-breakpoint
matlab-insert-condition-breakpoint

which make it easy to add a breakpoint while editing a .m file

-Nate

-- Anonymous 2016-08-18 16:42 UTC

