Mercurial > vim
comparison src/change.c @ 30853:40df8a6515f6 v9.0.0761
patch 9.0.0761: cannot use 'indentexpr' for Lisp indenting
Commit: https://github.com/vim/vim/commit/49846fb1a31de99f49d6a7e70efe685197423c84
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 15 16:05:33 2022 +0100
patch 9.0.0761: cannot use 'indentexpr' for Lisp indenting
Problem: Cannot use 'indentexpr' for Lisp indenting.
Solution: Add the 'lispoptions' option.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 15 Oct 2022 17:15:04 +0200 |
parents | 942f1b3bc694 |
children | 74e64f3a54ef |
comparison
equal
deleted
inserted
replaced
30852:46157e3ebe96 | 30853:40df8a6515f6 |
---|---|
2267 State = MODE_INSERT; | 2267 State = MODE_INSERT; |
2268 } | 2268 } |
2269 else | 2269 else |
2270 vreplace_mode = 0; | 2270 vreplace_mode = 0; |
2271 | 2271 |
2272 if (!p_paste | 2272 if (!p_paste) |
2273 && leader == NULL | 2273 { |
2274 && curbuf->b_p_lisp | 2274 if (leader == NULL |
2275 && curbuf->b_p_ai) | 2275 && !use_indentexpr_for_lisp() |
2276 { | 2276 && curbuf->b_p_lisp |
2277 // do lisp indenting | 2277 && curbuf->b_p_ai) |
2278 fixthisline(get_lisp_indent); | 2278 { |
2279 ai_col = (colnr_T)getwhitecols_curline(); | 2279 // do lisp indenting |
2280 } | 2280 fixthisline(get_lisp_indent); |
2281 else if (do_cindent) | 2281 ai_col = (colnr_T)getwhitecols_curline(); |
2282 { | 2282 } |
2283 // do 'cindent' or 'indentexpr' indenting | 2283 else if (do_cindent || (curbuf->b_p_ai && use_indentexpr_for_lisp())) |
2284 do_c_expr_indent(); | 2284 { |
2285 ai_col = (colnr_T)getwhitecols_curline(); | 2285 // do 'cindent' or 'indentexpr' indenting |
2286 do_c_expr_indent(); | |
2287 ai_col = (colnr_T)getwhitecols_curline(); | |
2288 } | |
2286 } | 2289 } |
2287 | 2290 |
2288 if (vreplace_mode != 0) | 2291 if (vreplace_mode != 0) |
2289 State = vreplace_mode; | 2292 State = vreplace_mode; |
2290 | 2293 |