patch 9.0.0761: cannot use 'indentexpr' for Lisp indenting
Problem: Cannot use 'indentexpr' for Lisp indenting.
Solution: Add the 'lispoptions' option.
diff --git a/src/testdir/test_lispindent.vim b/src/testdir/test_lispindent.vim
index 3c8660e..770c501 100644
--- a/src/testdir/test_lispindent.vim
+++ b/src/testdir/test_lispindent.vim
@@ -97,8 +97,23 @@
exe "normal a(x\<CR>1\<CR>2)\<Esc>"
let expected = ['(x', ' 1', ' 2)']
call assert_equal(expected, getline(1, 3))
+ " with Lisp indenting the first line is not indented
normal 1G=G
call assert_equal(expected, getline(1, 3))
+
+ %del
+ setl lispoptions=expr:1 indentexpr=5
+ exe "normal a(x\<CR>1\<CR>2)\<Esc>"
+ let expected_expr = ['(x', ' 1', ' 2)']
+ call assert_equal(expected_expr, getline(1, 3))
+ normal 2G2<<=G
+ call assert_equal(expected_expr, getline(1, 3))
+
+ setl lispoptions=expr:0
+ " with Lisp indenting the first line is not indented
+ normal 1G3<<=G
+ call assert_equal(expected, getline(1, 3))
+
bwipe!
endfunc