Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can write an interactive function that runs fill-paragraph (or whatever M-q is bound to in the mode you are using), then deletes multiple spaces (something like http://stackoverflow.com/questions/8674912/how-to-collapse-w...).

That would not be a good default because some people, like me, like to align their code in columns (for example, things like let clauses).

What I would like to see come as an Emacs default is just-one-space working on regions with the behavior you describe.



What I've noticed after using paredit is that I'm doing a lot less paren matching (well none) and a lot more white space clean up, so I think such a function would be very useful to run as a hook on insert char. Since the program is always syntactically correct, it might almost work...

And @sedachv, thanks for Parenscript. It makes Javascript almost...well, now I can work it it :) Much appreciated.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: