3 ms·
I've actually encountered this, but I can't say it stumped me at all.. my syntax highlighting made it immediately apparent what would have happened had I tried
by burgerbrain 15y ago
I've actually encountered this, but I can't say it stumped me at all.. my syntax highlighting made it immediately apparent what would have happened had I tried to build.
A coworker of mine also ran into a similar issue (not realizing something was commented out, thus odd behaviour) with a if 0 .... #endif comment. Vim highlights that correctly too but his emacs setup did not (no idea how stock it was).
- hartror 15y agoThat was my reaction. Syntax highlighting makes syntax errors a breeze to notice.
- Jach 15y agoI thought this as well, then added a point to "Backslash directory separators" on my list of reasons to go back in time to kill Bill Gates...
- gmac 15y agoExactly. This seems, first and foremost, a syntax highlighting bug.
- Wilfred 15y agoFor what it's worth: that's stock Emacs behaviour, at least on the current version (23.3). Seems like a highlighting bug.
- jrockway 15y ago"#if 0" is not how you declare comments in C. If you want your dead code to show up as a comment, try M-x comment-region. It adds /* */ around each line, being careful to ensure the ability to reverse the operation. I know vim doesn't have good commenting functionality in the core, so this is probably a common vim user idiom. But it's still not correct.