annotate runtime/ftplugin/mail.vim @ 31182:645c854bbf74 v9.0.0925

patch 9.0.0925: two conditions are always false Commit: https://github.com/vim/vim/commit/df3c0eb41e1f48596c85af88b42fed22e3cca328 Author: zeertzjq <zeertzjq@outlook.com> Date: Wed Nov 23 11:23:17 2022 +0000 patch 9.0.0925: two conditions are always false Problem: Two conditions are always false. Solution: Remove the conditions. Update return value types to make clear what could be returned. (closes #11593)
author Bram Moolenaar <Bram@vim.org>
date Wed, 23 Nov 2022 12:30:04 +0100
parents babd9f1dbe12
children 4027cefc2aab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Mail
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
26100
babd9f1dbe12 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3967
diff changeset
4 " Last Change: 2021 Oct 23
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3967
fdb8a9c7bd91 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
12 let b:undo_ftplugin = "setl modeline< tw< fo< comments<"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
14 " Don't use modelines in e-mail messages, avoid trojan horses and nasty
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
15 " "jokes" (e.g., setting 'textwidth' to 5).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 setlocal nomodeline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " many people recommend keeping e-mail messages 72 chars wide
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 if &tw == 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 setlocal tw=72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Set 'formatoptions' to break text lines and keep the comment leader ">".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 setlocal fo+=tcql
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3967
fdb8a9c7bd91 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
26 " Add n:> to 'comments, in case it was removed elsewhere
fdb8a9c7bd91 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
27 setlocal comments+=n:>
fdb8a9c7bd91 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
28
26100
babd9f1dbe12 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3967
diff changeset
29 " .eml files are universally formatted with DOS line-endings, per RFC5322.
babd9f1dbe12 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3967
diff changeset
30 " If the file was not DOS the it will be marked as changed, which is probably
babd9f1dbe12 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3967
diff changeset
31 " a good thing.
babd9f1dbe12 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3967
diff changeset
32 if expand('%:e') ==? 'eml'
babd9f1dbe12 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3967
diff changeset
33 let b:undo_ftplugin ..= " fileformat=" .. &fileformat
babd9f1dbe12 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3967
diff changeset
34 setlocal fileformat=dos
babd9f1dbe12 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3967
diff changeset
35 endif
babd9f1dbe12 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3967
diff changeset
36
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1121
diff changeset
37 " Add mappings, unless the user doesn't want this.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 if !exists("no_plugin_maps") && !exists("no_mail_maps")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Quote text by inserting "> "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 if !hasmapto('<Plug>MailQuote')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 vmap <buffer> <LocalLeader>q <Plug>MailQuote
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 nmap <buffer> <LocalLeader>q <Plug>MailQuote
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR>:noh<CR>``
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR>:noh<CR>``
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 endif