Indent bodies of local function definitions properly in elisp-mode
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-function): Check for local defforms (`cl-flet' and `cl-labels'). (lisp--local-defform-body): New auxiliary function (bug#9622).
This commit is contained in:
parent
c748164702
commit
38037e04cb
3 changed files with 54 additions and 10 deletions
|
@ -330,5 +330,16 @@ Expected initialization file: `%s'\"
|
|||
(faceup-clean-buffer)
|
||||
(should (faceup-test-font-lock-buffer 'emacs-lisp-mode faceup)))))
|
||||
|
||||
(ert-deftest test-cl-flet-indentation ()
|
||||
(should (equal
|
||||
(with-temp-buffer
|
||||
(lisp-mode)
|
||||
(insert "(cl-flet ((bla (x)\n(* x x)))\n(bla 42))")
|
||||
(indent-region (point-min) (point-max))
|
||||
(buffer-string))
|
||||
"(cl-flet ((bla (x)
|
||||
(* x x)))
|
||||
(bla 42))")))
|
||||
|
||||
(provide 'lisp-mode-tests)
|
||||
;;; lisp-mode-tests.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue