Emacs check syntax of file before saving

Posted by astropanic on Super User See other posts from Super User or by astropanic
Published on 2010-03-05T08:18:20Z Indexed on 2010/03/08 3:05 UTC
Read the original article Hit count: 315

How I can prevent Emacs from saving my buffer when it contains syntax errors ?

It would by especially useful for editing source code.

I'm writing some source code into the buffer, hit C-x C-s and Emacs should position the cursor on the line containing the error. I'm correcting the error, hit the save command again, and Emacs should save the file.

© Super User or respective owner

Emacs check syntax of file before saving

Posted by astropanic on Super User See other posts from Super User or by astropanic
Published on 2010-03-05T08:18:20Z Indexed on 2010/03/08 3:32 UTC
Read the original article Hit count: 315

How I can prevent Emacs from saving my buffer when it contains syntax errors ?

It would by especially useful for editing source code.

I'm writing some source code into the buffer, hit C-x C-s and Emacs should position the cursor on the line containing the error. I'm correcting the error, hit the save command again, and Emacs should save the file.

© Super User or respective owner

Related posts about emacs

Related posts about text-editing