changeset 822:45fad0f590d0

updated for version 7.0c12
author vimboss
date Fri, 07 Apr 2006 21:33:12 +0000
parents a2b128f7d705
children 9ab23f1e137f
files runtime/colors/slate.vim runtime/makemenu.vim runtime/spell/hu/hu_HU.diff runtime/spell/hu/main.aap runtime/synmenu.vim runtime/syntax/sisu.vim src/ex_docmd.c src/fileio.c src/getchar.c src/globals.h src/gui_w48.c src/mbyte.c src/message.c src/os_unix.c src/spell.c
diffstat 15 files changed, 429 insertions(+), 124 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/runtime/colors/slate.vim
@@ -0,0 +1,54 @@
+"%% SiSU Vim color file
+" Slate Maintainer: Ralph Amissah <ralph@amissah.com>
+" (originally looked at desert Hans Fugal <hans@fugal.net> http://hans.fugal.net/vim/colors/desert.vim (2003/05/06 16:37:49)
+:set background=dark
+:highlight clear
+if version > 580
+ hi clear
+ if exists("syntax_on")
+ syntax reset
+ endif
+endif
+:hi Normal guifg=White guibg=grey15
+:hi Cursor guibg=khaki guifg=slategrey
+:hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
+:hi Folded guibg=black guifg=grey40 ctermfg=grey ctermbg=darkgrey
+:hi FoldColumn guibg=black guifg=grey20 ctermfg=4 ctermbg=7
+:hi IncSearch guifg=green guibg=black cterm=none ctermfg=yellow ctermbg=green
+:hi ModeMsg guifg=goldenrod cterm=none ctermfg=brown
+:hi MoreMsg guifg=SeaGreen ctermfg=darkgreen
+:hi NonText guifg=RoyalBlue guibg=grey15 cterm=bold ctermfg=blue
+:hi Question guifg=springgreen ctermfg=green
+:hi Search guibg=peru guifg=wheat cterm=none ctermfg=grey ctermbg=blue
+:hi SpecialKey guifg=yellowgreen ctermfg=darkgreen
+:hi StatusLine guibg=#c2bfa5 guifg=black gui=none cterm=bold,reverse
+:hi StatusLineNC guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
+:hi Title guifg=gold gui=bold cterm=bold ctermfg=yellow
+:hi Statement guifg=CornflowerBlue ctermfg=lightblue
+:hi Visual gui=none guifg=khaki guibg=olivedrab cterm=reverse
+:hi WarningMsg guifg=salmon ctermfg=1
+:hi String guifg=SkyBlue ctermfg=darkcyan
+:hi Comment guifg=DimGrey ctermfg=darkgrey
+:hi Constant guifg=#ffa0a0 ctermfg=brown
+:hi Special guifg=DarkKhaki ctermfg=brown
+:hi Identifier guifg=salmon ctermfg=darkred
+:hi Include guifg=darkred ctermfg=darkred
+:hi PreProc guifg=olivedrab ctermfg=red
+:hi Operator guifg=CornflowerBlue ctermfg=darkcyan
+:hi Define guifg=gold gui=bold ctermfg=yellow
+:hi Type guifg=darkkhaki ctermfg=2
+:hi Function guifg=navajowhite ctermfg=brown
+:hi LineNr guifg=grey50 ctermfg=3
+:hi Ignore guifg=grey40 cterm=bold ctermfg=7
+:hi Todo guifg=orangered guibg=yellow2
+:hi Directory ctermfg=darkcyan
+:hi ErrorMsg cterm=bold guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1
+:hi VisualNOS cterm=bold,underline
+:hi WildMenu ctermfg=0 ctermbg=3
+:hi DiffAdd ctermbg=4
+:hi DiffChange ctermbg=5
+:hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
+:hi DiffText cterm=bold ctermbg=1
+:hi Underlined cterm=underline ctermfg=5
+:hi Error guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1
+:hi SpellErrors guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1
--- a/runtime/makemenu.vim
+++ b/runtime/makemenu.vim
@@ -1,6 +1,6 @@
 " Script to define the syntax menu in synmenu.vim
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2006 Mar 28
+" Last Change:	2006 Apr 07
 
 " This is used by "make menu" in the src directory.
 edit <sfile>:p:h/synmenu.vim
@@ -411,6 +411,7 @@ SynMenu Sh-S.Simula:simula
 SynMenu Sh-S.Sinda.Sinda\ compare:sindacmp
 SynMenu Sh-S.Sinda.Sinda\ input:sinda
 SynMenu Sh-S.Sinda.Sinda\ output:sindaout
+SynMenu Sh-S.SiSU:sisu
 SynMenu Sh-S.SKILL.SKILL:skill
 SynMenu Sh-S.SKILL.SKILL\ for\ Diva:diva
 SynMenu Sh-S.Slice:slice
--- a/runtime/spell/hu/hu_HU.diff
+++ b/runtime/spell/hu/hu_HU.diff
@@ -1,5 +1,5 @@
 *** hu_HU.orig.aff	Sun Mar 26 15:05:13 2006
---- hu_HU.aff	Sun Mar 26 21:17:08 2006
+--- hu_HU.aff	Thu Apr  6 19:48:01 2006
 ***************
 *** 57,59 ****
   NAME Magyar Ispell helyesírási szótár
@@ -91,7 +91,7 @@
   
 ! FORBIDDENWORD w
 ! WORDCHARS -.§%°0123456789–
-! 
+  
   
 ! NOT_GENERATE &
 ! GENERATE (
@@ -102,19 +102,19 @@
   
 ! #FORBIDDENWORD w
 ! BAD w
-  
+! 
 ! #WORDCHARS -.§%°0123456789–
   
-! # List the word characters for ISO-8859-2.
-! FOL ±¢³µ¶¨¹º»¼¾¿±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ-§%°
-! LOW ±¢³µ¶¨¹º»¼¾¿±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ-§%°
-! UPP ¡¢£¥¦¨©ª«¬®¯±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ-§%°
-! MIDWORD .
-! 
++ # List the word characters for ISO-8859-2.
++ FOL ±¢³µ¶¨¹º»¼¾¿±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ-§%°
++ LOW ±¢³µ¶¨¹º»¼¾¿±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ-§%°
++ UPP ¡¢£¥¦¨©ª«¬®¯±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ-§%°
++ MIDWORD .
+  
 ! # These are not documented and not in the source code either
 ! #NOT_GENERATE &
 ! #GENERATE (
-! 
+  
 ! # Only for morphological analysis
 ! #LEMMA_PRESENT )
 ! 
@@ -278,6 +278,12 @@
 ! #CHR 123 U2 Ü
 ! #CHR 123 U3 Û
   
+***************
+*** 22054,22055 ****
+--- 22083,22085 ----
+  PFX D 0 leg [^AÁBCDEÉFGHIÍJKLMNOÓÖÕPQRSTUÚÜÛVWZ]
++ 
+  PFX " Y 37
 *** hu_HU.orig.dic	Sun Mar 26 15:05:13 2006
 --- hu_HU.dic	Sun Mar 26 20:12:13 2006
 ***************
--- a/runtime/spell/hu/main.aap
+++ b/runtime/spell/hu/main.aap
@@ -21,7 +21,8 @@ all: $SPELLDIR/hu.iso-8859-2.spl $SPELLD
 $SPELLDIR/hu.cp1250.spl : $FILES
         :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/hu hu_HU" -c q
 
-../README_hu.txt: $FILES
+# There is no readme in the .zip file, use the header of the .aff file.
+../README_hu.txt: hu_HU.aff
         :sys $VIM -u NONE -e hu_HU.aff -c "1,/# ---/w! $target" -c q
 
 #
--- a/runtime/synmenu.vim
+++ b/runtime/synmenu.vim
@@ -382,46 +382,47 @@ an 50.100.160 &Syntax.Sh-S.Simula :cal S
 an 50.100.170 &Syntax.Sh-S.Sinda.Sinda\ compare :cal SetSyn("sindacmp")<CR>
 an 50.100.180 &Syntax.Sh-S.Sinda.Sinda\ input :cal SetSyn("sinda")<CR>
 an 50.100.190 &Syntax.Sh-S.Sinda.Sinda\ output :cal SetSyn("sindaout")<CR>
-an 50.100.200 &Syntax.Sh-S.SKILL.SKILL :cal SetSyn("skill")<CR>
-an 50.100.210 &Syntax.Sh-S.SKILL.SKILL\ for\ Diva :cal SetSyn("diva")<CR>
-an 50.100.220 &Syntax.Sh-S.Slice :cal SetSyn("slice")<CR>
-an 50.100.230 &Syntax.Sh-S.SLRN.Slrn\ rc :cal SetSyn("slrnrc")<CR>
-an 50.100.240 &Syntax.Sh-S.SLRN.Slrn\ score :cal SetSyn("slrnsc")<CR>
-an 50.100.250 &Syntax.Sh-S.SmallTalk :cal SetSyn("st")<CR>
-an 50.100.260 &Syntax.Sh-S.Smarty\ Templates :cal SetSyn("smarty")<CR>
-an 50.100.270 &Syntax.Sh-S.SMIL :cal SetSyn("smil")<CR>
-an 50.100.280 &Syntax.Sh-S.SMITH :cal SetSyn("smith")<CR>
-an 50.100.290 &Syntax.Sh-S.SNMP\ MIB :cal SetSyn("mib")<CR>
-an 50.100.300 &Syntax.Sh-S.SNNS.SNNS\ network :cal SetSyn("snnsnet")<CR>
-an 50.100.310 &Syntax.Sh-S.SNNS.SNNS\ pattern :cal SetSyn("snnspat")<CR>
-an 50.100.320 &Syntax.Sh-S.SNNS.SNNS\ result :cal SetSyn("snnsres")<CR>
-an 50.100.330 &Syntax.Sh-S.Snobol4 :cal SetSyn("snobol4")<CR>
-an 50.100.340 &Syntax.Sh-S.Snort\ Configuration :cal SetSyn("hog")<CR>
-an 50.100.350 &Syntax.Sh-S.SPEC\ (Linux\ RPM) :cal SetSyn("spec")<CR>
-an 50.100.360 &Syntax.Sh-S.Specman :cal SetSyn("specman")<CR>
-an 50.100.370 &Syntax.Sh-S.Spice :cal SetSyn("spice")<CR>
-an 50.100.380 &Syntax.Sh-S.Spyce :cal SetSyn("spyce")<CR>
-an 50.100.390 &Syntax.Sh-S.Speedup :cal SetSyn("spup")<CR>
-an 50.100.400 &Syntax.Sh-S.Splint :cal SetSyn("splint")<CR>
-an 50.100.410 &Syntax.Sh-S.Squid\ config :cal SetSyn("squid")<CR>
-an 50.100.420 &Syntax.Sh-S.SQL.ESQL-C :cal SetSyn("esqlc")<CR>
-an 50.100.430 &Syntax.Sh-S.SQL.MySQL :cal SetSyn("mysql")<CR>
-an 50.100.440 &Syntax.Sh-S.SQL.PL/SQL :cal SetSyn("plsql")<CR>
-an 50.100.450 &Syntax.Sh-S.SQL.SQL\ Anywhere :cal SetSyn("sqlanywhere")<CR>
-an 50.100.460 &Syntax.Sh-S.SQL.SQL\ (automatic) :cal SetSyn("sql")<CR>
-an 50.100.470 &Syntax.Sh-S.SQL.SQL\ (Oracle) :cal SetSyn("sqloracle")<CR>
-an 50.100.480 &Syntax.Sh-S.SQL.SQL\ Forms :cal SetSyn("sqlforms")<CR>
-an 50.100.490 &Syntax.Sh-S.SQL.SQLJ :cal SetSyn("sqlj")<CR>
-an 50.100.500 &Syntax.Sh-S.SQL.SQL-Informix :cal SetSyn("sqlinformix")<CR>
-an 50.100.510 &Syntax.Sh-S.SQR :cal SetSyn("sqr")<CR>
-an 50.100.520 &Syntax.Sh-S.Ssh.ssh_config :cal SetSyn("sshconfig")<CR>
-an 50.100.530 &Syntax.Sh-S.Ssh.sshd_config :cal SetSyn("sshdconfig")<CR>
-an 50.100.540 &Syntax.Sh-S.Standard\ ML :cal SetSyn("sml")<CR>
-an 50.100.550 &Syntax.Sh-S.Stored\ Procedures :cal SetSyn("stp")<CR>
-an 50.100.560 &Syntax.Sh-S.Strace :cal SetSyn("strace")<CR>
-an 50.100.570 &Syntax.Sh-S.Subversion\ commit :cal SetSyn("svn")<CR>
-an 50.100.580 &Syntax.Sh-S.Sudoers :cal SetSyn("sudoers")<CR>
-an 50.100.590 &Syntax.Sh-S.Sysctl\.conf :cal SetSyn("sysctl")<CR>
+an 50.100.200 &Syntax.Sh-S.SiSU :cal SetSyn("sisu")<CR>
+an 50.100.210 &Syntax.Sh-S.SKILL.SKILL :cal SetSyn("skill")<CR>
+an 50.100.220 &Syntax.Sh-S.SKILL.SKILL\ for\ Diva :cal SetSyn("diva")<CR>
+an 50.100.230 &Syntax.Sh-S.Slice :cal SetSyn("slice")<CR>
+an 50.100.240 &Syntax.Sh-S.SLRN.Slrn\ rc :cal SetSyn("slrnrc")<CR>
+an 50.100.250 &Syntax.Sh-S.SLRN.Slrn\ score :cal SetSyn("slrnsc")<CR>
+an 50.100.260 &Syntax.Sh-S.SmallTalk :cal SetSyn("st")<CR>
+an 50.100.270 &Syntax.Sh-S.Smarty\ Templates :cal SetSyn("smarty")<CR>
+an 50.100.280 &Syntax.Sh-S.SMIL :cal SetSyn("smil")<CR>
+an 50.100.290 &Syntax.Sh-S.SMITH :cal SetSyn("smith")<CR>
+an 50.100.300 &Syntax.Sh-S.SNMP\ MIB :cal SetSyn("mib")<CR>
+an 50.100.310 &Syntax.Sh-S.SNNS.SNNS\ network :cal SetSyn("snnsnet")<CR>
+an 50.100.320 &Syntax.Sh-S.SNNS.SNNS\ pattern :cal SetSyn("snnspat")<CR>
+an 50.100.330 &Syntax.Sh-S.SNNS.SNNS\ result :cal SetSyn("snnsres")<CR>
+an 50.100.340 &Syntax.Sh-S.Snobol4 :cal SetSyn("snobol4")<CR>
+an 50.100.350 &Syntax.Sh-S.Snort\ Configuration :cal SetSyn("hog")<CR>
+an 50.100.360 &Syntax.Sh-S.SPEC\ (Linux\ RPM) :cal SetSyn("spec")<CR>
+an 50.100.370 &Syntax.Sh-S.Specman :cal SetSyn("specman")<CR>
+an 50.100.380 &Syntax.Sh-S.Spice :cal SetSyn("spice")<CR>
+an 50.100.390 &Syntax.Sh-S.Spyce :cal SetSyn("spyce")<CR>
+an 50.100.400 &Syntax.Sh-S.Speedup :cal SetSyn("spup")<CR>
+an 50.100.410 &Syntax.Sh-S.Splint :cal SetSyn("splint")<CR>
+an 50.100.420 &Syntax.Sh-S.Squid\ config :cal SetSyn("squid")<CR>
+an 50.100.430 &Syntax.Sh-S.SQL.ESQL-C :cal SetSyn("esqlc")<CR>
+an 50.100.440 &Syntax.Sh-S.SQL.MySQL :cal SetSyn("mysql")<CR>
+an 50.100.450 &Syntax.Sh-S.SQL.PL/SQL :cal SetSyn("plsql")<CR>
+an 50.100.460 &Syntax.Sh-S.SQL.SQL\ Anywhere :cal SetSyn("sqlanywhere")<CR>
+an 50.100.470 &Syntax.Sh-S.SQL.SQL\ (automatic) :cal SetSyn("sql")<CR>
+an 50.100.480 &Syntax.Sh-S.SQL.SQL\ (Oracle) :cal SetSyn("sqloracle")<CR>
+an 50.100.490 &Syntax.Sh-S.SQL.SQL\ Forms :cal SetSyn("sqlforms")<CR>
+an 50.100.500 &Syntax.Sh-S.SQL.SQLJ :cal SetSyn("sqlj")<CR>
+an 50.100.510 &Syntax.Sh-S.SQL.SQL-Informix :cal SetSyn("sqlinformix")<CR>
+an 50.100.520 &Syntax.Sh-S.SQR :cal SetSyn("sqr")<CR>
+an 50.100.530 &Syntax.Sh-S.Ssh.ssh_config :cal SetSyn("sshconfig")<CR>
+an 50.100.540 &Syntax.Sh-S.Ssh.sshd_config :cal SetSyn("sshdconfig")<CR>
+an 50.100.550 &Syntax.Sh-S.Standard\ ML :cal SetSyn("sml")<CR>
+an 50.100.560 &Syntax.Sh-S.Stored\ Procedures :cal SetSyn("stp")<CR>
+an 50.100.570 &Syntax.Sh-S.Strace :cal SetSyn("strace")<CR>
+an 50.100.580 &Syntax.Sh-S.Subversion\ commit :cal SetSyn("svn")<CR>
+an 50.100.590 &Syntax.Sh-S.Sudoers :cal SetSyn("sudoers")<CR>
+an 50.100.600 &Syntax.Sh-S.Sysctl\.conf :cal SetSyn("sysctl")<CR>
 an 50.110.100 &Syntax.TUV.TADS :cal SetSyn("tads")<CR>
 an 50.110.110 &Syntax.TUV.Tags :cal SetSyn("tags")<CR>
 an 50.110.120 &Syntax.TUV.TAK.TAK\ compare :cal SetSyn("takcmp")<CR>
new file mode 100644
--- /dev/null
+++ b/runtime/syntax/sisu.vim
@@ -0,0 +1,172 @@
+"%% SiSU Vim syntax file
+" Markup:       SiSU
+" SiSU Maintainer: Ralph Amissah <ralph@amissah.com>
+" (originally looked at Ruby Vim by Mirko Nasato)
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+"  :colorscheme green
+  finish
+else
+endif
+"% 12 Errors?
+syn match sisu_error contains=sisu_contain,sisu_control,sisu_markpara,sisu_mark,sisu_content_alt,sisu_error_wspace "<![^ei]\S\+!>"
+"% 11 Expression Substitution: and Backslash Notation
+"% 10 Markers: Endnote Identifiers, Pagebreaks etc.: 
+if !exists("sisu_no_identifiers")
+  syn match   sisu_mark_endnote   "\~^"
+  syn match   sisu_contain        "</\?sub>"
+  syn match   sisu_break          "<br>\|<br />"
+  syn match   sisu_control        "<p>\|</p>\|<p />\|<:p[bn]>"
+  syn match   sisu_html           "<center>\|</center>"
+  syn match   sisu_markpara       "^_\([12]\*\?\|\*\)\s\+"
+  syn match   sisu_markpara       "#[ 1]\|_# "
+  syn match   sisu_marktail       "[~-]#"
+  syn match   sisu_html           "<td>\|<td \|<tr>\|</td>\|</tr>\|<table>\|<table \|</table>"
+  syn match   sisu_control        "\""
+  syn match   sisu_underline      "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)"he=e-1
+  "metaverse specific
+  syn match   sisu_ocn            "<\~\d\+;\w\d\+;\w\d\+>"
+  syn match   sisu_digest         "<[0-9a-f]\{32\}:[0-9a-f]\{32\}>\|<[0-9a-f]\{32\}>"
+  syn match   sisu_digest         "<[0-9a-f]\{64\}:[0-9a-f]\{64\}>\|<[0-9a-f]\{64\}>"
+  syn match   sisu_marktail       "<\~#>"
+  syn match   sisu_markpara       "<:i[12]>"
+  syn match   sisu_link           " \*\~\S\+"
+  syn match   sisu_action         "^<<.\+"
+  syn match   sisu_action         "^<:insert\d\+>"
+  syn match   sisu_contain        "<:e>"
+endif
+"% 9 URLs Numbers: and ASCII Codes
+syn match   sisu_number           "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>"
+syn match   sisu_link             "\(http://\|\.\./\)\S\+"
+syn match   sisu_number           "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)"
+"% 8 Tuned Error - is error if not already matched
+syn match sisu_error              "[\~/\*!_]{\|}[\~/\*!_]" contains=sisu_error
+syn match sisu_error              "<a href\|</a>]" contains=sisu_error
+"% 7 Simple Enclosed Markup:
+" Simple Markup:
+"%   header
+syn region sisu_header contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="0\~" end="$"
+"%   headings
+syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_digest,sisu_error,sisu_error_wspace,sisu_error_spell matchgroup=sisu_heading start="[1-8]\~[^-]" end="$"
+"%   grouped text
+syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="table{.\+" end="}table"
+syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="{t\~h}" end="$$"
+syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)"
+syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code"
+"%   endnotes
+syn region sisu_content_endnote contains=sisu_digest,sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_error_spell,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{" end="}\~" skip="\n"
+syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_error_spell,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n"
+"%   images
+syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_error,sisu_error_spell matchgroup=sisu_link start="{" end="}\(\(http://\|\.\./\)\S\+\|image\)" oneline
+"syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_link start="{" end="}\(\(http://\|\.\./\)\S\+\|image\)" oneline
+"sisu_identifier fix
+""syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_link start="{" end="}\(http\S\+\|image\)" oneline
+"%   font face curly brackets
+syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_spell matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$"
+syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="\*{" end="}\*"
+syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="!{" end="}!"
+syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="_{" end="}_"
+syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="/{" end="}/"
+syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="+{" end="}+"
+syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="\^{" end="}\^"
+syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start=",{" end="}," 
+syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" 
+syn region sisu_control contains=sisu_error matchgroup=sisu_content_alt start="<b>" end="</b>" oneline
+syn region sisu_control contains=sisu_error matchgroup=sisu_content_alt start="<em>" end="</em>" oneline
+syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="<u>" end="</u>" oneline
+syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="<i>" end="</i>" oneline
+syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="<ins>" end="</ins>" skip="\\\\\|\\'" oneline
+syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="<del>" end="</del>" oneline
+syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="<a href=\".\{-}\">" end="</a>" oneline
+"%   single words bold italicise etc. "workon
+syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline
+syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline
+"syn region sisu_underline matchgroup=sisu_underline start="\([ (]\|^\)_\([^ !*{\\][\w]\|[^12][^*]\)"hs=e-2 end="\(_\([ )\.]\|$\)\| \)"he=e-1 skip="[a-zA-Z0-9']" oneline
+"%   html
+syn region sisu_number contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_contain start="<b>" end="</b>" skip="\n"
+syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_contain start="<i>" end="</i>" skip="\n"
+syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_contain start="<u>" end="</u>" skip="\n"
+"%   misc
+syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\^[^{\|\n\\]" end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline
+"% metaverse
+syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="<:Table.\{-}>" end="<:Table[-_]end>"
+syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="<:code>" end="<:code[-_]end>"
+syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="<:alt>" end="<:alt[-_]end>"
+syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="<:poem>" end="<:poem[-_]end>"
+"% 6 Expensive Mode
+" Expensive Mode:
+if !exists("sisu_no_expensive")
+else " not Expensive
+  syn region  sisu_content_alt  matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline
+endif " Expensive?
+"% 5 Headers: and Headings (Document Instructions)
+"syn match   sisu_header contains=sisu_error,sisu_error_wspace,sisu_mark "0\~.*"
+syn match   sisu_comment contains=sisu_error "^% .*\|^%% .*"
+syn match   sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+"
+syn region  sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$"
+"% 4 Errors?
+syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+"
+syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+"
+syn match sisu_error_wspace contains=sisu_error_wspace  " \s*$"
+syn match sisu_error contains=sisu_error,sisu_error_wspace "[^ (}]http:\S\+"
+syn match sisu_error contains=sisu_error "http:\S\+[}><]"
+syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n\n"
+syn match sisu_error contains=sisu_error "^[\-\~]{[^{]\{-}\n\n"
+syn match sisu_error contains=sisu_error "\s\+.{{"
+syn match sisu_error contains=sisu_error "^\~\s*$"
+syn match sisu_error contains=sisu_error "^[0-9]\~\s*$"
+syn match sisu_error contains=sisu_error "^[0-9]\~\S\+\s*$"
+syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]"
+syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*"
+syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]"
+syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']"
+syn match sisu_error contains=sisu_error "<dir>"
+syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>"
+syn match sisu_error  "/\?<\([biu]\)>[^(</\1>)]\{-}\n\n"
+"% 3 Error Exceptions?
+syn match sisu_control "\n\n" "contains=ALL
+syn match sisu_control " //"
+syn match sisu_error  "%{"
+syn match sisu_error "<br>http:\S\+\|http:\S\+<br>"
+syn match sisu_error "[><]http:\S\+\|http:\S\+[><]"
+"% 2 Definitions - Define the default highlighting.
+if version >= 508 || !exists("did_sisu_syntax_inits")
+  if version < 508
+    let did_sisu_syntax_inits = 1
+    command -nargs=+ HiLink hi link <args>
+  else
+    command -nargs=+ HiLink hi def link <args>
+  endif
+"% 1 Defined
+  HiLink sisu_header          PreProc
+  HiLink sisu_heading         Title
+  HiLink sisu_contain         Include
+  HiLink sisu_mark_endnote    Include
+  HiLink sisu_link            NonText
+  HiLink sisu_linked          String
+  HiLink sisu_fontface        Include
+  HiLink sisu_strikeout       DiffDelete
+  HiLink sisu_content_alt     Special
+  HiLink sisu_content_endnote Special
+  HiLink sisu_control         Define
+  HiLink sisu_ocn             Include
+  HiLink sisu_digest          Identifier
+  HiLink sisu_number          Number
+  HiLink sisu_identifier      Function
+  HiLink sisu_underline       Underlined
+  HiLink sisu_markpara        Include
+  HiLink sisu_marktail        Include
+  HiLink sisu_mark            Identifier
+  HiLink sisu_break           Structure
+  HiLink sisu_html            Type
+  HiLink sisu_action          Identifier
+  HiLink sisu_comment         Comment
+  HiLink sisu_error_spell     SpellErrors "line does nothing
+  HiLink sisu_error_wspace    Error
+  HiLink sisu_error           Error
+  "HiLink sisu_                Statement
+  "HiLink sisu_                Operator
+  delcommand HiLink
+endif
+let b:current_syntax = "sisu"
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2177,7 +2177,12 @@ do_one_cmd(cmdlinep, sourcing,
 	    goto doend;
 	}
 #ifdef FEAT_AUTOCMD
+	/* Disallow editing another buffer when "curbuf_lock" is set.
+	 * Do allow ":edit" (check for argument later).
+	 * Do allow ":checktime" (it's postponed). */
 	if (!(ea.argt & CMDWIN)
+		&& ea.cmdidx != CMD_edit
+		&& ea.cmdidx != CMD_checktime
 # ifdef FEAT_USR_CMDS
 		&& !USER_CMDIDX(ea.cmdidx)
 # endif
@@ -7402,6 +7407,12 @@ do_exedit(eap, old_curwin)
 #endif
 	    )
     {
+#ifdef FEAT_AUTOCMD
+	/* Can't edit another file when "curbuf_lock" is set.  Only ":edit"
+	 * can bring us here, others are stopped earlier. */
+	if (*eap->arg != NUL && curbuf_locked())
+	    return;
+#endif
 	n = readonlymode;
 	if (eap->cmdidx == CMD_view || eap->cmdidx == CMD_sview)
 	    readonlymode = TRUE;
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6071,7 +6071,7 @@ check_timestamps(focus)
 
     if (!stuff_empty() || global_busy || !typebuf_typed()
 #ifdef FEAT_AUTOCMD
-			|| autocmd_busy
+			|| autocmd_busy || curbuf_lock > 0
 #endif
 					)
 	need_check_timestamps = TRUE;		/* check later */
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1822,7 +1822,7 @@ vgetorpeek(advance)
      * Using ":normal" can also do this, but it saves the typeahead buffer,
      * thus it should be OK.  But don't get a key from the user then.
      */
-    if (vgetc_busy
+    if (vgetc_busy > 0
 #ifdef FEAT_EX_EXTRA
 	    && ex_normal_busy == 0
 #endif
@@ -1831,7 +1831,7 @@ vgetorpeek(advance)
 
     local_State = get_real_state();
 
-    vgetc_busy = TRUE;
+    ++vgetc_busy;
 
     if (advance)
 	KeyStuffed = FALSE;
@@ -2316,10 +2316,25 @@ vgetorpeek(advance)
 #ifdef FEAT_EVAL
 			/*
 			 * Handle ":map <expr>": evaluate the {rhs} as an
-			 * expression.
+			 * expression.  Save and restore the typeahead so that
+			 * getchar() can be used.
 			 */
 			if (mp->m_expr)
-			    s = eval_to_string(mp->m_str, NULL, FALSE);
+			{
+			    tasave_T	tabuf;
+			    int		save_vgetc_busy = vgetc_busy;
+
+			    save_typeahead(&tabuf);
+			    if (tabuf.typebuf_valid)
+			    {
+				vgetc_busy = 0;
+				s = eval_to_string(mp->m_str, NULL, FALSE);
+				vgetc_busy = save_vgetc_busy;
+			    }
+			    else
+				s = NULL;
+			    restore_typeahead(&tabuf);
+			}
 			else
 #endif
 			    s = mp->m_str;
@@ -2689,7 +2704,7 @@ vgetorpeek(advance)
 	gui_update_cursor(TRUE, FALSE);
 #endif
 
-    vgetc_busy = FALSE;
+    --vgetc_busy;
 
     return c;
 }
--- a/src/globals.h
+++ b/src/globals.h
@@ -202,7 +202,7 @@ EXTERN int	x_force_connect INIT(= FALSE)
 # endif
 #endif
 EXTERN int	ex_keep_indent INIT(= FALSE); /* getexmodeline(): keep indent */
-EXTERN int	vgetc_busy INIT(= FALSE);   /* inside vgetc() now */
+EXTERN int	vgetc_busy INIT(= 0);	    /* when inside vgetc() then > 0 */
 
 EXTERN int	didset_vim INIT(= FALSE);   /* did set $VIM ourselves */
 EXTERN int	didset_vimruntime INIT(= FALSE);   /* idem for $VIMRUNTIME */
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -1114,22 +1114,19 @@ gui_mch_set_text_area_pos(int x, int y, 
 #ifdef FEAT_TOOLBAR
     if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
 	SendMessage(s_toolbarhwnd, WM_SIZE,
-		(WPARAM)0, (LPARAM)(w + ((long)(TOOLBAR_BUTTON_HEIGHT+8)<<16)));
+	      (WPARAM)0, (LPARAM)(w + ((long)(TOOLBAR_BUTTON_HEIGHT+8)<<16)));
 #endif
 #if defined(FEAT_GUI_TABLINE)
     if (showing_tabline)
     {
 	int	top = 0;
-	RECT	rect;
 
 #ifdef FEAT_TOOLBAR
 	if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
 	    top = TOOLBAR_BUTTON_HEIGHT + TOOLBAR_BORDER_HEIGHT;
 #endif
-
-	SetRect(&rect, 0, top, w, TABLINE_HEIGHT);
-	TabCtrl_AdjustRect(s_tabhwnd, TRUE, &rect);
-	MoveWindow(s_tabhwnd, 0, top, rect.right, rect.bottom, TRUE);
+	GetClientRect(s_hwnd, &rect);
+	MoveWindow(s_tabhwnd, 0, top, rect.right, TABLINE_HEIGHT, TRUE);
     }
 #endif
 
@@ -1460,7 +1457,7 @@ gui_mch_get_color(char_u *name)
 	if (fname == NULL)
 	    return INVALCOLOR;
 
-	fd = fopen((char *)fname, "rt");
+	fd = mch_fopen((char *)fname, "rt");
 	vim_free(fname);
 	if (fd == NULL)
 	    return INVALCOLOR;
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -3532,6 +3532,7 @@ static int xim_ignored_char = FALSE;
 im_show_info(void)
 {
     int	    old_vgetc_busy;
+
     old_vgetc_busy = vgetc_busy;
     vgetc_busy = TRUE;
     showmode();
--- a/src/message.c
+++ b/src/message.c
@@ -869,7 +869,7 @@ wait_return(redraw)
  * end. Adjust cmdline_row to avoid the next message overwriting the last one.
  * When inside vgetc(), we can't wait for a typed character at all.
  */
-    if (vgetc_busy)
+    if (vgetc_busy > 0)
 	return;
     if (no_wait_return)
     {
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4872,7 +4872,7 @@ mch_expandpath(gap, path, flags)
 # define SEEK_END 2
 #endif
 
-#define SHELL_SPECIAL (char_u *)"\t \"&';<>()\\|"
+#define SHELL_SPECIAL (char_u *)"\t \"&'$;<>()\\|"
 
 /* ARGSUSED */
     int
--- a/src/spell.c
+++ b/src/spell.c
@@ -356,18 +356,22 @@ typedef long idx_T;
 #define WF_CAPMASK (WF_ONECAP | WF_ALLCAP | WF_KEEPCAP | WF_FIXCAP)
 
 /* flags for <pflags> */
-#define WFP_RARE    0x01	/* rare prefix */
-#define WFP_NC	    0x02	/* prefix is not combining */
-#define WFP_UP	    0x04	/* to-upper prefix */
-
-/* Flags for postponed prefixes.  Must be above affixID (one byte)
- * and prefcondnr (two bytes). */
-#define WF_RAREPFX  (WFP_RARE << 24)	/* in sl_pidxs: flag for rare
-					 * postponed prefix */
-#define WF_PFX_NC   (WFP_NC << 24)	/* in sl_pidxs: flag for non-combining
-					 * postponed prefix */
-#define WF_PFX_UP   (WFP_UP << 24)	/* in sl_pidxs: flag for to-upper
-					 * postponed prefix */
+#define WFP_RARE	    0x01	/* rare prefix */
+#define WFP_NC		    0x02	/* prefix is not combining */
+#define WFP_UP		    0x04	/* to-upper prefix */
+#define WFP_COMPPERMIT	    0x08	/* prefix with COMPOUNDPERMITFLAG */
+#define WFP_COMPFORBID	    0x10	/* prefix with COMPOUNDFORBIDFLAG */
+
+/* Flags for postponed prefixes in "sl_pidxs".  Must be above affixID (one
+ * byte) and prefcondnr (two bytes). */
+#define WF_RAREPFX  (WFP_RARE << 24)	/* rare postponed prefix */
+#define WF_PFX_NC   (WFP_NC << 24)	/* non-combining postponed prefix */
+#define WF_PFX_UP   (WFP_UP << 24)	/* to-upper postponed prefix */
+#define WF_PFX_COMPPERMIT (WFP_COMPPERMIT << 24) /* postponed prefix with
+						  * COMPOUNDPERMITFLAG */
+#define WF_PFX_COMPFORBID (WFP_COMPFORBID << 24) /* postponed prefix with
+						  * COMPOUNDFORBIDFLAG */
+
 
 /* flags for <compoptions> */
 #define COMP_CHECKDUP		1	/* CHECKCOMPOUNDDUP */
@@ -3473,9 +3477,11 @@ read_compound(fd, slang, len)
 					    /* <comppatlen> <comppattext> */
 		if (cnt < 0)
 		    return cnt;
-		todo -= cnt + 2;
-	    }
-    }
+		todo -= cnt + 1;
+	    }
+    }
+    if (todo < 0)
+	return SP_FORMERROR;
 
     /* Turn the COMPOUNDRULE items into a regexp pattern:
      * "a[bc]/a*b+" -> "^\(a[bc]\|a*b\+\)$".
@@ -4683,6 +4689,8 @@ struct affentry_S
     char_u	*ae_flags;	/* flags on the affix (can be NULL) */
     char_u	*ae_cond;	/* condition (NULL for ".") */
     regprog_T	*ae_prog;	/* regexp program for ae_cond or NULL */
+    char	ae_compforbid;	/* COMPOUNDFORBIDFLAG found */
+    char	ae_comppermit;	/* COMPOUNDPERMITFLAG found */
 };
 
 #ifdef FEAT_MBYTE
@@ -4842,6 +4850,7 @@ typedef struct spellinfo_S
 } spellinfo_T;
 
 static afffile_T *spell_read_aff __ARGS((spellinfo_T *spin, char_u *fname));
+static void aff_process_flags __ARGS((afffile_T *affile, affentry_T *entry));
 static int spell_info_item __ARGS((char_u *s));
 static unsigned affitem2flag __ARGS((int flagtype, char_u *item, char_u	*fname, int lnum));
 static unsigned get_affitem __ARGS((int flagtype, char_u **pp));
@@ -5273,12 +5282,18 @@ spell_read_aff(spin, fname)
 	    {
 		aff->af_compforbid = affitem2flag(aff->af_flagtype, items[1],
 								 fname, lnum);
+		if (aff->af_pref.ht_used > 0)
+		    smsg((char_u *)_("Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"),
+			    fname, lnum);
 	    }
 	    else if (STRCMP(items[0], "COMPOUNDPERMITFLAG") == 0
 				   && itemcnt == 2 && aff->af_comppermit == 0)
 	    {
 		aff->af_comppermit = affitem2flag(aff->af_flagtype, items[1],
 								 fname, lnum);
+		if (aff->af_pref.ht_used > 0)
+		    smsg((char_u *)_("Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"),
+			    fname, lnum);
 	    }
 	    else if (STRCMP(items[0], "COMPOUNDFLAG") == 0 && itemcnt == 2
 							 && compflags == NULL)
@@ -5528,10 +5543,13 @@ spell_read_aff(spin, fname)
 		{
 		    aff_entry->ae_add = getroom_save(spin, items[3]);
 
-		    /* Recognize flags on the affix: abcd/1234 */
+		    /* Recognize flags on the affix: abcd/XYZ */
 		    aff_entry->ae_flags = vim_strchr(aff_entry->ae_add, '/');
 		    if (aff_entry->ae_flags != NULL)
+		    {
 			*aff_entry->ae_flags++ = NUL;
+			aff_process_flags(aff, aff_entry);
+		    }
 		}
 
 		/* Don't use an affix entry with non-ASCII characters when
@@ -5560,7 +5578,8 @@ spell_read_aff(spin, fname)
 
 		    /* For postponed prefixes we need an entry in si_prefcond
 		     * for the condition.  Use an existing one if possible.
-		     * Can't be done for an affix with flags. */
+		     * Can't be done for an affix with flags, ignoring
+		     * COMPOUNDFORBIDFLAG and COMPOUNDPERMITFLAG. */
 		    if (*items[0] == 'P' && aff->af_pfxpostpone
 					       && aff_entry->ae_flags == NULL)
 		    {
@@ -5653,10 +5672,6 @@ spell_read_aff(spin, fname)
 							  aff_entry->ae_cond);
 			    }
 
-			    if (aff_entry->ae_flags != NULL)
-				smsg((char_u *)_("Affix flags ignored when PFXPOSTPONE used in %s line %d: %s"),
-						       fname, lnum, items[4]);
-
 			    /* Add the prefix to the prefix tree. */
 			    if (aff_entry->ae_add == NULL)
 				p = (char_u *)"";
@@ -5670,6 +5685,10 @@ spell_read_aff(spin, fname)
 				n |= WFP_NC;
 			    if (upper)
 				n |= WFP_UP;
+			    if (aff_entry->ae_comppermit)
+				n |= WFP_COMPPERMIT;
+			    if (aff_entry->ae_compforbid)
+				n |= WFP_COMPFORBID;
 			    tree_add_word(spin, p, spin->si_prefroot, n,
 						      idx, cur_aff->ah_newID);
 			    did_postpone_prefix = TRUE;
@@ -5930,6 +5949,43 @@ spell_read_aff(spin, fname)
 }
 
 /*
+ * For affix "entry" move COMPOUNDFORBIDFLAG and COMPOUNDPERMITFLAG from
+ * ae_flags to ae_comppermit and ae_compforbid.
+ */
+    static void
+aff_process_flags(affile, entry)
+    afffile_T	*affile;
+    affentry_T	*entry;
+{
+    char_u	*p;
+    char_u	*prevp;
+    int		flag;
+
+    if (entry->ae_flags != NULL
+		&& (affile->af_compforbid != 0 || affile->af_comppermit != 0))
+    {
+	for (p = entry->ae_flags; *p != NUL; )
+	{
+	    prevp = p;
+	    flag = get_affitem(affile->af_flagtype, &p);
+	    if (flag == affile->af_comppermit || flag == affile->af_compforbid)
+	    {
+		mch_memmove(prevp, p, STRLEN(p) + 1);
+		p = prevp;
+		if (flag == affile->af_comppermit)
+		    entry->ae_comppermit = TRUE;
+		else
+		    entry->ae_compforbid = TRUE;
+	    }
+	    if (affile->af_flagtype == AFT_NUM && *p == ',')
+		++p;
+	}
+	if (*entry->ae_flags == NUL)
+	    entry->ae_flags = NULL;	/* nothing left */
+    }
+}
+
+/*
  * Return TRUE if "s" is the name of an info item in the affix file.
  */
     static int
@@ -6379,28 +6435,6 @@ spell_read_dic(spin, fname, affile)
 	    continue;	/* empty line */
 	line[l] = NUL;
 
-	/* Truncate the word at the "/", set "afflist" to what follows.
-	 * Replace "\/" by "/" and "\\" by "\". */
-	afflist = NULL;
-	for (p = line; *p != NUL; mb_ptr_adv(p))
-	{
-	    if (*p == '\\' && (p[1] == '\\' || p[1] == '/'))
-		mch_memmove(p, p + 1, STRLEN(p));
-	    else if (*p == '/')
-	    {
-		*p = NUL;
-		afflist = p + 1;
-		break;
-	    }
-	}
-
-	/* Skip non-ASCII words when "spin->si_ascii" is TRUE. */
-	if (spin->si_ascii && has_non_ascii(line))
-	{
-	    ++non_ascii;
-	    continue;
-	}
-
 #ifdef FEAT_MBYTE
 	/* Convert from "SET" to 'encoding' when needed. */
 	if (spin->si_conv.vc_type != CONV_NONE)
@@ -6421,6 +6455,28 @@ spell_read_dic(spin, fname, affile)
 	    w = line;
 	}
 
+	/* Truncate the word at the "/", set "afflist" to what follows.
+	 * Replace "\/" by "/" and "\\" by "\". */
+	afflist = NULL;
+	for (p = w; *p != NUL; mb_ptr_adv(p))
+	{
+	    if (*p == '\\' && (p[1] == '\\' || p[1] == '/'))
+		mch_memmove(p, p + 1, STRLEN(p));
+	    else if (*p == '/')
+	    {
+		*p = NUL;
+		afflist = p + 1;
+		break;
+	    }
+	}
+
+	/* Skip non-ASCII words when "spin->si_ascii" is TRUE. */
+	if (spin->si_ascii && has_non_ascii(w))
+	{
+	    ++non_ascii;
+	    continue;
+	}
+
 	/* This takes time, print a message every 10000 words. */
 	if (spin->si_verbose && spin->si_msg_count > 10000)
 	{
@@ -6825,12 +6881,7 @@ store_aff_word(spin, word, afflist, affi
 
 			/* Obey a "COMPOUNDFORBIDFLAG" of the affix: don't
 			 * use the compound flags. */
-			if (use_pfxlist != NULL
-				&& affile->af_compforbid != 0
-				&& ae->ae_flags != NULL
-				&& flag_in_afflist(
-				    affile->af_flagtype, ae->ae_flags,
-						       affile->af_compforbid))
+			if (use_pfxlist != NULL && ae->ae_compforbid)
 			{
 			    vim_strncpy(pfx_pfxlist, use_pfxlist, use_pfxlen);
 			    use_pfxlist = pfx_pfxlist;
@@ -6854,12 +6905,7 @@ store_aff_word(spin, word, afflist, affi
 			/* When compounding is supported and there is no
 			 * "COMPOUNDPERMITFLAG" then forbid compounding on the
 			 * side where the affix is applied. */
-			if (spin->si_compflags != NULL
-				&& (affile->af_comppermit == 0
-				    || ae->ae_flags == NULL
-				    || !flag_in_afflist(
-					    affile->af_flagtype, ae->ae_flags,
-						      affile->af_comppermit)))
+			if (spin->si_compflags != NULL && !ae->ae_comppermit)
 			{
 			    if (xht != NULL)
 				use_flags |= WF_NOCOMPAFT;
@@ -10677,7 +10723,7 @@ suggest_load_files()
 	    if (dotp == NULL || fnamecmp(dotp, ".spl") != 0)
 		continue;
 	    STRCPY(dotp, ".sug");
-	    fd = fopen((char *)slang->sl_fname, "r");
+	    fd = mch_fopen((char *)slang->sl_fname, "r");
 	    if (fd == NULL)
 		goto nextone;