Mercurial > vim
annotate runtime/ftplugin/mail.vim @ 34618:7ff3c277377f v9.1.0198
patch 9.1.0198: Vim9: compound operators broken for lambdas in an object
Commit: https://github.com/vim/vim/commit/d990bf08d85d83e14fc51fd99a66ebe2f36d2fcd
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Fri Mar 22 19:56:17 2024 +0100
patch 9.1.0198: Vim9: compound operators broken for lambdas in an object
Problem: Vim9: compound operators broken for lambdas in an object
(girishji)
Solution: When using an object from the outer scope, use the LOADOUTER
instruction to load the object (Yegappan Lakshmanan).
fixes: #14236
closes: #14266
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 22 Mar 2024 20:00:06 +0100 |
parents | 4027cefc2aab |
children |
rev | line source |
---|---|
7 | 1 " Vim filetype plugin file |
2 " Language: Mail | |
32770
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
26100
diff
changeset
|
3 " Maintainer: The Vim Project <https://github.com/vim/vim> |
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
26100
diff
changeset
|
4 " Last Change: 2023 Aug 10 |
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
26100
diff
changeset
|
5 " Former Maintainer: Bram Moolenaar <Bram@vim.org> |
7 | 6 |
7 " Only do this when not done yet for this buffer | |
8 if exists("b:did_ftplugin") | |
9 finish | |
10 endif | |
11 let b:did_ftplugin = 1 | |
12 | |
3967 | 13 let b:undo_ftplugin = "setl modeline< tw< fo< comments<" |
7 | 14 |
1121 | 15 " Don't use modelines in e-mail messages, avoid trojan horses and nasty |
16 " "jokes" (e.g., setting 'textwidth' to 5). | |
7 | 17 setlocal nomodeline |
18 | |
19 " many people recommend keeping e-mail messages 72 chars wide | |
20 if &tw == 0 | |
21 setlocal tw=72 | |
22 endif | |
23 | |
24 " Set 'formatoptions' to break text lines and keep the comment leader ">". | |
25 setlocal fo+=tcql | |
26 | |
3967 | 27 " Add n:> to 'comments, in case it was removed elsewhere |
28 setlocal comments+=n:> | |
29 | |
26100 | 30 " .eml files are universally formatted with DOS line-endings, per RFC5322. |
31 " If the file was not DOS the it will be marked as changed, which is probably | |
32 " a good thing. | |
33 if expand('%:e') ==? 'eml' | |
34 let b:undo_ftplugin ..= " fileformat=" .. &fileformat | |
35 setlocal fileformat=dos | |
36 endif | |
37 | |
2034 | 38 " Add mappings, unless the user doesn't want this. |
7 | 39 if !exists("no_plugin_maps") && !exists("no_mail_maps") |
40 " Quote text by inserting "> " | |
41 if !hasmapto('<Plug>MailQuote') | |
42 vmap <buffer> <LocalLeader>q <Plug>MailQuote | |
43 nmap <buffer> <LocalLeader>q <Plug>MailQuote | |
44 endif | |
45 vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR>:noh<CR>`` | |
46 nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR>:noh<CR>`` | |
47 endif |