ECB (Emacs Code Browser) is an editing environment for emacs. It uses the semantic tool for parsing source, which underlines code that doesn't parse.

However, semantic does not have support for PHP (which is hard to begin with, since PHP files are often mixed HTML and PHP), so it tends to disapprove of a lot of syntax, leading to annoying red underlined text in the editor window.

It turns out you can disable this by running:semantic-show-unmatched-syntax-mode

To disable this by default, load the file semantic-load.el from the semantic source distribution, locate line 266 (approximately, I have version 1.4.4 here), which says:(global-semantic-show-unmatched-syntax-mode 1) and change the 1 into a zero. Then recompile by running make in that same directory.

You could add a shortcut key to toggle the feature on and off by adding a line like this to your ~/.emacs file:(global-set-key [\M-f5] 'semantic-show-unmatched-syntax-mode) (this will make Alt+F5 the toggle key)

...

Send me your comments!

Something didn't work as expected?
You'd like to add some useful info to this tip?
Use the form below to send me your comments.
(Don't forget to fill out the super-lame CAPTCHA below..)