diff options
| author | Noam Postavsky | 2017-03-15 22:27:27 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2017-04-22 14:09:58 -0400 |
| commit | 4713dd425beac5cb459704e67dcb8f6faf714375 (patch) | |
| tree | 5f3ba3603a4bc724180d9b872b50c183c39a664b /etc/srecode | |
| parent | 2f6769f9cdb799e880fdcc09057353a0a2349bfc (diff) | |
| download | emacs-4713dd425beac5cb459704e67dcb8f6faf714375.tar.gz emacs-4713dd425beac5cb459704e67dcb8f6faf714375.zip | |
Add new `lisp-indent-region' that doesn't reparse the code.
Both `lisp-indent-region' and `lisp-indent-line' now use `syntax-ppss'
to get initial state, so they will no longer indent string literal
contents.
* lisp/emacs-lisp/lisp-mode.el (lisp-ppss): New function, like
`syntax-ppss', but with a more dependable item 2.
(lisp-indent-region): New function, like `indent-region-line-by-line'
but additionally keep a running parse state to avoid reparsing the
code repeatedly. Use `lisp-ppss' to get initial state.
(lisp-indent-line): Take optional PARSE-STATE argument, pass it to
`calculate-lisp-indent', use `lisp-ppss' if not given.
(lisp-mode-variables): Set `indent-region-function' to
`lisp-indent-region'.
Diffstat (limited to 'etc/srecode')
0 files changed, 0 insertions, 0 deletions