Added keyword and comment char.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 29 Jan 2010 11:31:17 +0200
changeset 281 457b9057a35a
parent 280 9250e3ad5f4a
child 282 a119108fd2ca
Added keyword and comment char.
lisp/nsis-mode.el
--- a/lisp/nsis-mode.el	Thu Jan 28 22:27:45 2010 +0200
+++ b/lisp/nsis-mode.el	Fri Jan 29 11:31:17 2010 +0200
@@ -18,10 +18,35 @@
 
 ;;;###autoload
 (define-generic-mode 'nsis-mode
-  (list ?\;)
-  '("Section" "SectionEnd" "Function" "FunctionEnd" "Call" "Goto")
-  '(("!\\([A-Za-z]+\\)" (1 'font-lock-builtin-face))
+  (list ?\; ?\#)
+  '(
+    "Section" "SectionEnd" "Function" "FunctionEnd" "File"
+    "Name" "ShowInstDetails" "ComponentText" "Caption"
+    "LicenseData" "BrandingText"
+    "Exec" "ExecWait" "ExecShell" "Goto" "Call" "Return" "Abort" "Quit" "Reboot"
+    "Page" "PageEx" "PageCallbacks" "PageExEnd"
+    "Delete" "CopyFiles" "CreateDirectory" "RMDir" "OutFile" "ReserveFile" "CreateShortCut"
+    "Var" "Pop"
+    "StrCpy" "StrCmp" "IntCmp"
+    "InitPluginsDir" "addplugindir" "InstallDir" "InstallDirRegKey"
+    "RequestExecutionLevel" "CRCCheck" "XPStyle"
+    "UninstallText"
+    "ReadIniStr" "WriteIniStr"
+    "DirText" "DirVar" "DirVerify"
+    "Icon" "UninstallIcon"
+    "SendMessage" "MessageBox" "GetDlgItem"
+    "FindWindow" "EnableWindow" "LockWindow" "ShowWindow"
+    "SetAutoClose" "CreateFont" "SetCtlColors" "SetBrandingImage"
+    "IfSilent" "IfAbort" "IfRebootFlag" "IfErrors" "IfFileExists"
+    "ReadRegStr" "WriteRegStr" "DeleteRegKey" "WriteRegDWORD"
+    "LoadLanguageFile" "LangString"
+    "SubCaption" "UninstallSubCaption"
+    "SetPluginUnload" "DetailPrint" "SetOutPath" "WriteUninstaller" "ClearErrors"
+    )
+  '(
+    ("!\\(insertmacro\\|define\\|ifdef\\|ifndef\\|else\\|endif\\|echo\\|verbose\\|include\\|macroend\\|macro\\|undef\\|warning\\|error\\)" (1 'font-lock-builtin-face))
     ("$[({]?\\([A-Za-z0-9_]+\\)[)}]?" (1 'font-lock-variable-name-face))
+    ("\\([[:alpha:]][[:alnum:]_.]*:[[:blank:]]*$\\)" (1 'font-lock-function-name-face))
     )
   (list "\\.\\(nsi\\|nsh\\)$")
   nil