Mercurial > vim
annotate runtime/syntax/slrnrc.vim @ 29544:80b4c435450a v9.0.0113
patch 9.0.0113: has() is not strict about parsing the patch version
Commit: https://github.com/vim/vim/commit/d90f91fe3075bb51668ed926182b2163da9df001
Author: K.Takata <kentkt@csc.jp>
Date: Sat Jul 30 15:43:59 2022 +0100
patch 9.0.0113: has() is not strict about parsing the patch version
Problem: has() is not strict about parsing the patch version.
Solution: Check the version more strictly. (Ken Takata, closes https://github.com/vim/vim/issues/10752)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 30 Jul 2022 16:45:05 +0200 |
parents | 46763b01cd9a |
children | d46f974fd69e |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
842 | 2 " Language: Slrn setup file (based on slrn 0.9.8.1) |
3 " Maintainer: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> | |
4 " Last Change: 23 April 2006 | |
7 | 5 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
842
diff
changeset
|
6 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
842
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 syn keyword slrnrcTodo contained Todo | |
12 | |
13 " In some places whitespace is illegal | |
14 syn match slrnrcSpaceError contained "\s" | |
15 | |
16 syn match slrnrcNumber contained "-\=\<\d\+\>" | |
17 syn match slrnrcNumber contained +'[^']\+'+ | |
18 | |
19 syn match slrnrcSpecKey contained +\(\\[er"']\|\^[^'"]\|\\\o\o\o\)+ | |
20 | |
21 syn match slrnrcKey contained "\S\+" contains=slrnrcSpecKey | |
22 syn region slrnrcKey contained start=+"+ skip=+\\"+ end=+"+ oneline contains=slrnrcSpecKey | |
23 syn region slrnrcKey contained start=+'+ skip=+\\'+ end=+'+ oneline contains=slrnrcSpecKey | |
24 | |
25 syn match slrnrcSpecChar contained +'+ | |
26 syn match slrnrcSpecChar contained +\\[n"]+ | |
27 syn match slrnrcSpecChar contained "%[dfmnrs%]" | |
28 | |
29 syn match slrnrcString contained /[^ \t%"']\+/ contains=slrnrcSpecChar | |
30 syn region slrnrcString contained start=+"+ skip=+\\"+ end=+"+ oneline contains=slrnrcSpecChar | |
31 | |
32 syn match slrnSlangPreCondit "^#\s*ifn\=\(def\>\|false\>\|true\>\|\$\)" | |
33 syn match slrnSlangPreCondit "^#\s*e\(lif\|lse\|ndif\)\>" | |
34 | |
35 syn match slrnrcComment "%.*$" contains=slrnrcTodo | |
36 | |
37 syn keyword slrnrcVarInt contained abort_unmodified_edits article_window_page_overlap auto_mark_article_as_read beep broken_xref broken_xref cc_followup check_new_groups | |
38 syn keyword slrnrcVarInt contained color_by_score confirm_actions custom_sort_by_threads display_cursor_bar drop_bogus_groups editor_uses_mime_charset emphasized_text_mask | |
39 syn keyword slrnrcVarInt contained emphasized_text_mode fold_headers fold_headers followup_strip_signature force_authentication force_authentication generate_date_header | |
40 syn keyword slrnrcVarInt contained generate_email_from generate_email_from generate_message_id grouplens_port hide_pgpsignature hide_quotes hide_signature | |
41 syn keyword slrnrcVarInt contained hide_verbatim_marks hide_verbatim_text highlight_unread_subjects highlight_urls ignore_signature kill_score lines_per_update | |
42 syn keyword slrnrcVarInt contained mail_editor_is_mua max_low_score max_queued_groups min_high_score mouse netiquette_warnings new_subject_breaks_threads no_autosave | |
43 syn keyword slrnrcVarInt contained no_backups prefer_head process_verbatim_marks query_next_article query_next_group query_read_group_cutoff read_active reject_long_lines | |
44 syn keyword slrnrcVarInt contained scroll_by_page show_article show_thread_subject simulate_graphic_chars smart_quote sorting_method spoiler_char spoiler_char | |
45 syn keyword slrnrcVarInt contained spoiler_display_mode spoiler_display_mode spool_check_up_on_nov spool_check_up_on_nov uncollapse_threads unsubscribe_new_groups use_blink | |
46 syn keyword slrnrcVarInt contained use_color use_flow_control use_grouplens use_grouplens use_header_numbers use_inews use_inews use_localtime use_metamail use_mime use_mime | |
47 syn keyword slrnrcVarInt contained use_recommended_msg_id use_slrnpull use_slrnpull use_tilde use_tmpdir use_uudeview use_uudeview warn_followup_to wrap_flags wrap_method | |
48 syn keyword slrnrcVarInt contained write_newsrc_flags | |
49 | |
50 " Listed for removal | |
51 syn keyword slrnrcVarInt contained author_display display_author_realname display_score group_dsc_start_column process_verbatum_marks prompt_next_group query_reconnect | |
52 syn keyword slrnrcVarInt contained show_descriptions use_xgtitle | |
53 | |
54 " Match as a "string" too | |
55 syn region slrnrcVarIntStr contained matchgroup=slrnrcVarInt start=+"+ end=+"+ oneline contains=slrnrcVarInt,slrnrcSpaceError | |
56 | |
57 syn keyword slrnrcVarStr contained Xbrowser art_help_line art_status_line cansecret_file cc_post_string charset custom_headers custom_sort_order decode_directory | |
58 syn keyword slrnrcVarStr contained editor_command failed_posts_file followup_custom_headers followup_date_format followup_string followupto_string group_help_line | |
59 syn keyword slrnrcVarStr contained group_status_line grouplens_host grouplens_pseudoname header_help_line header_status_line hostname inews_program macro_directory | |
60 syn keyword slrnrcVarStr contained mail_editor_command metamail_command mime_charset non_Xbrowser organization overview_date_format post_editor_command post_object | |
61 syn keyword slrnrcVarStr contained postpone_directory printer_name quote_string realname reply_custom_headers reply_string replyto save_directory save_posts save_replies | |
62 syn keyword slrnrcVarStr contained score_editor_command scorefile sendmail_command server_object signature signoff_string spool_active_file spool_activetimes_file | |
63 syn keyword slrnrcVarStr contained spool_inn_root spool_newsgroups_file spool_nov_file spool_nov_root spool_overviewfmt_file spool_root supersedes_custom_headers | |
64 syn keyword slrnrcVarStr contained top_status_line username | |
65 | |
66 " Listed for removal | |
67 syn keyword slrnrcVarStr contained followup cc_followup_string | |
68 | |
69 " Match as a "string" too | |
70 syn region slrnrcVarStrStr contained matchgroup=slrnrcVarStr start=+"+ end=+"+ oneline contains=slrnrcVarStr,slrnrcSpaceError | |
71 | |
72 " Various commands | |
73 syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(autobaud\|color\|compatible_charsets\|group_display_format\|grouplens_add\|header_display_format\|ignore_quotes\|include\|interpret\|mono\|nnrpaccess\|posting_host\|server\|set\|setkey\|strip_re_regexp\|strip_sig_regexp\|strip_was_regexp\|unsetkey\|visible_headers\)\>" end="$" oneline contains=slrnrc\(String\|Comment\) | |
74 | |
75 " Listed for removal | |
76 syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(cc_followup_string\|decode_directory\|editor_command\|followup\|hostname\|organization\|quote_string\|realname\|replyto\|scorefile\|signature\|username\)\>" end="$" oneline contains=slrnrc\(String\|Comment\) | |
77 | |
78 " Setting variables | |
79 syn keyword slrnrcSet contained set | |
80 syn match slrnrcSetStr "^\s*set\s\+\S\+" skipwhite nextgroup=slrnrcString contains=slrnrcSet,slrnrcVarStr\(Str\)\= | |
81 syn match slrnrcSetInt contained "^\s*set\s\+\S\+" contains=slrnrcSet,slrnrcVarInt\(Str\)\= | |
82 syn match slrnrcSetIntLine "^\s*set\s\+\S\+\s\+\(-\=\d\+\>\|'[^']\+'\)" contains=slrnrcSetInt,slrnrcNumber,slrnrcVarInt | |
83 | |
84 " Color definitions | |
85 syn match slrnrcColorObj contained "\<quotes\d\+\>" | |
86 syn keyword slrnrcColorObj contained article author boldtext box cursor date description error frame from_myself group grouplens_display header_name header_number headers | |
87 syn keyword slrnrcColorObj contained high_score italicstext menu menu_press message neg_score normal pgpsignature pos_score quotes response_char selection signature status | |
88 syn keyword slrnrcColorObj contained subject thread_number tilde tree underlinetext unread_subject url verbatim | |
89 | |
90 " Listed for removal | |
91 syn keyword slrnrcColorObj contained verbatum | |
92 | |
93 syn region slrnrcColorObjStr contained matchgroup=slrnrcColorObj start=+"+ end=+"+ oneline contains=slrnrcColorObj,slrnrcSpaceError | |
94 syn keyword slrnrcColorVal contained default | |
95 syn keyword slrnrcColorVal contained black blue brightblue brightcyan brightgreen brightmagenta brightred brown cyan gray green lightgray magenta red white yellow | |
96 syn region slrnrcColorValStr contained matchgroup=slrnrcColorVal start=+"+ end=+"+ oneline contains=slrnrcColorVal,slrnrcSpaceError | |
97 " Mathcing a function with three arguments | |
98 syn keyword slrnrcColor contained color | |
99 syn match slrnrcColorInit contained "^\s*color\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Obj\|ObjStr\)\= | |
100 syn match slrnrcColorLine "^\s*color\s\+\S\+\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Init\|Val\|ValStr\) | |
101 | |
102 " Mono settings | |
103 syn keyword slrnrcMonoVal contained blink bold none reverse underline | |
104 syn region slrnrcMonoValStr contained matchgroup=slrnrcMonoVal start=+"+ end=+"+ oneline contains=slrnrcMonoVal,slrnrcSpaceError | |
105 " Color object is inherited | |
106 " Mono needs at least one argument | |
107 syn keyword slrnrcMono contained mono | |
108 syn match slrnrcMonoInit contained "^\s*mono\s\+\S\+" contains=slrnrcMono,slrnrcColorObj\(Str\)\= | |
109 syn match slrnrcMonoLine "^\s*mono\s\+\S\+\s\+\S.*" contains=slrnrcMono\(Init\|Val\|ValStr\),slrnrcComment | |
110 | |
111 " Functions in article mode | |
112 syn keyword slrnrcFunArt contained article_bob article_eob article_left article_line_down article_line_up article_page_down article_page_up article_right article_search | |
113 syn keyword slrnrcFunArt contained author_search_backward author_search_forward browse_url cancel catchup catchup_all create_score decode delete delete_thread digit_arg | |
114 syn keyword slrnrcFunArt contained enlarge_article_window evaluate_cmd exchange_mark expunge fast_quit followup forward forward_digest get_children_headers get_parent_header | |
115 syn keyword slrnrcFunArt contained goto_article goto_last_read grouplens_rate_article header_bob header_eob header_line_down header_line_up header_page_down header_page_up | |
116 syn keyword slrnrcFunArt contained help hide_article locate_article mark_spot next next_high_score next_same_subject pipe post post_postponed previous print quit redraw | |
117 syn keyword slrnrcFunArt contained repeat_last_key reply request save show_spoilers shrink_article_window skip_quotes skip_to_next_group skip_to_previous_group | |
118 syn keyword slrnrcFunArt contained subject_search_backward subject_search_forward supersede suspend tag_header toggle_collapse_threads toggle_header_formats | |
835 | 119 syn keyword slrnrcFunArt contained toggle_header_tag toggle_headers toggle_pgpsignature toggle_quotes toggle_rot13 toggle_signature toggle_sort toggle_verbatim_marks |
7 | 120 syn keyword slrnrcFunArt contained toggle_verbatim_text uncatchup uncatchup_all undelete untag_headers view_scores wrap_article zoom_article_window |
121 | |
122 " Listed for removal | |
123 syn keyword slrnrcFunArt contained art_bob art_eob art_xpunge article_linedn article_lineup article_pagedn article_pageup down enlarge_window goto_beginning goto_end left | |
124 syn keyword slrnrcFunArt contained locate_header_by_msgid pagedn pageup pipe_article prev print_article right scroll_dn scroll_up shrink_window skip_to_prev_group | |
125 syn keyword slrnrcFunArt contained toggle_show_author up | |
126 | |
127 " Functions in group mode | |
128 syn keyword slrnrcFunGroup contained add_group bob catchup digit_arg eob evaluate_cmd group_search group_search_backward group_search_forward help line_down line_up move_group | |
129 syn keyword slrnrcFunGroup contained page_down page_up post post_postponed quit redraw refresh_groups repeat_last_key save_newsrc select_group subscribe suspend | |
130 syn keyword slrnrcFunGroup contained toggle_group_formats toggle_hidden toggle_list_all toggle_scoring transpose_groups uncatchup unsubscribe | |
131 | |
132 " Listed for removal | |
133 syn keyword slrnrcFunGroup contained down group_bob group_eob pagedown pageup toggle_group_display uncatch_up up | |
134 | |
135 " Functions in readline mode (actually from slang's slrline.c) | |
835 | 136 syn keyword slrnrcFunRead contained bdel bol complete cycle del delbol delbow deleol down enter eol left quoted_insert right self_insert trim up |
7 | 137 |
138 " Binding keys | |
139 syn keyword slrnrcSetkeyObj contained article group readline | |
140 syn region slrnrcSetkeyObjStr contained matchgroup=slrnrcSetkeyObj start=+"+ end=+"+ oneline contains=slrnrcSetkeyObj | |
141 syn match slrnrcSetkeyArt contained '\("\=\)\<article\>\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunArt | |
142 syn match slrnrcSetkeyGroup contained '\("\=\)\<group\>\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunGroup | |
143 syn match slrnrcSetkeyRead contained '\("\=\)\<readline\>\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunRead | |
144 syn match slrnrcSetkey "^\s*setkey\>" skipwhite nextgroup=slrnrcSetkeyArt,slrnrcSetkeyGroup,slrnrcSetkeyRead | |
145 | |
146 " Unbinding keys | |
147 syn match slrnrcUnsetkey '^\s*unsetkey\s\+\("\)\=\(article\|group\|readline\)\>\1' skipwhite nextgroup=slrnrcKey contains=slrnrcSetkeyObj\(Str\)\= | |
148 | |
149 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
842
diff
changeset
|
150 " Only when an item doesn't have highlighting yet |
7 | 151 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
152 hi def link slrnrcTodo Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
153 hi def link slrnrcSpaceError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
154 hi def link slrnrcNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
155 hi def link slrnrcSpecKey SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
156 hi def link slrnrcKey String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
157 hi def link slrnrcSpecChar SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
158 hi def link slrnrcString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
159 hi def link slrnSlangPreCondit Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
160 hi def link slrnrcComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
161 hi def link slrnrcVarInt Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
162 hi def link slrnrcVarStr Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
163 hi def link slrnrcCmd slrnrcSet |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
164 hi def link slrnrcSet Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
165 hi def link slrnrcColor Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
166 hi def link slrnrcColorObj Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
167 hi def link slrnrcColorVal String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
168 hi def link slrnrcMono Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
169 hi def link slrnrcMonoObj Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
170 hi def link slrnrcMonoVal String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
171 hi def link slrnrcFunArt Macro |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
172 hi def link slrnrcFunGroup Macro |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
173 hi def link slrnrcFunRead Macro |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
174 hi def link slrnrcSetkeyObj Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
175 hi def link slrnrcSetkey Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
176 hi def link slrnrcUnsetkey slrnrcSetkey |
7 | 177 |
178 | |
179 let b:current_syntax = "slrnrc" | |
180 | |
181 "EOF vim: ts=8 noet tw=120 sw=8 sts=0 |