nsis-mode.el
changeset 318 6a430707c23e
parent 310 dca63c827ac1
child 320 2c4a6d477785
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nsis-mode.el	Mon Feb 22 11:49:37 2010 +0200
@@ -0,0 +1,69 @@
+;;; iar-linker-config-mode.el --- major mode for highlighting NSIS scripts
+
+;; Copyright (C) 2009, 2010 by Oleksandr Gavenko <gavenkoa@gmail.com>
+
+;; You can do anything with this file without any warranty.
+
+;; Author: Oleksandr Gavenko <gavenkoa@gmail.com>
+;; Maintainer: Oleksandr Gavenko <gavenkoa@gmail.com>
+;; Created: 2009-09-14
+;; Version: 0.1
+;; Keywords: languages
+
+;;; Commentary:
+;;
+;; Very pure syntax highlighting.
+
+;;; Code:
+
+;;;###autoload
+(define-generic-mode 'nsis-mode
+  (list ?\; ?\# '("/*" . "*/"))
+  '(
+    "Section" "SectionEnd" "SectionIn" "SectionGroup" "SectionGroupEnd" "Function" "FunctionEnd" "File"
+    "SectionSetFlags" "SectionGetFlags" "SectionSetText" "SectionGetText" "SectionSetInstTypes" "SectionGetInstTypes" "SectionSetSize" "SectionGetSize" "SetCurInstType" "GetCurInstType" "InstTypeSetText" "InstTypeGetText"
+    "Name" "ShowInstDetails" "Caption"
+    "LicenseText" "LicenseData" "LicenseForceSelection" "ComponentText" "BrandingText" "DetailsButtonText" "CompletedText" "UninstallText"
+    "DirText" "DirVar" "DirVerify"
+    "Exec" "ExecWait" "ExecShell" "Goto" "goto" "Call" "Return" "Abort" "Quit" "ClearErrors" "SetErrors"
+    "Reboot" "SetRebootFlag"
+    "IfSilent" "IfAbort" "IfRebootFlag" "IfErrors" "IfFileExists"
+    "GetCurrentAddress" "GetFunctionAddress" "GetLabelAddress"
+    "Page" "UninstPage" "PageEx" "PageCallbacks" "PageExEnd"
+    "Delete" "CopyFiles" "CreateDirectory" "RMDir" "OutFile" "ReserveFile" "CreateShortCut"
+    "CallInstDLL" "GetDLLVersion" "GetDLLVersionLocal" "RegDLL" "UnRegDLL"
+    "GetFileTime" "GetFileTimeLocal" "GetFullPathName" "GetTempFileName" "SearchPath" "SetFileAttributes"
+    "ReadRegStr" "WriteRegStr" "DeleteRegKey" "DeleteRegValue" "EnumRegKey" "EnumRegValue" "WriteRegDWORD" "ReadRegDWORD" "WriteRegDword" "WriteRegBin" "WriteRegDWORD" "WriteRegExpandStr"
+    "ExpandEnvStrings" "ReadEnvStr"
+    "DeleteINISec" "DeleteINIStr" "FlushINI" "ReadINIStr" "WriteINIStr"
+    "Var" "Pop" "Push" "Exch"
+    "StrLen" "StrCpy" "StrCmp" "StrCmpS" "IntCmp" "IntCmpU" "IntFmt" "IntOp"
+    "FileClose" "FileOpen" "FileRead" "FileReadByte" "FileSeek" "FileWrite" "FileWriteByte" "FindClose" "FindFirst" "FindNext"
+    "InitPluginsDir" "addplugindir" "InstallDir" "InstallDirRegKey" "InstType" "Nop" "Sleep"
+    "RequestExecutionLevel" "CRCCheck" "XPStyle"
+    "ReadIniStr" "WriteIniStr"
+    "LogSet" "LogText"
+    "Icon" "UninstallIcon"
+    "SendMessage" "MessageBox" "GetDlgItem"
+    "FindWindow" "EnableWindow" "LockWindow" "ShowWindow" "HideWindow" "IsWindow" "AutoCloseWindow"
+    "SetAutoClose" "CreateFont" "SetCtlColors" "SetBrandingImage" "SetDetailsView" "SetDetailsPrint" "SetSilent" "BringToFront" "DetailPrint"
+    "LoadLanguageFile" "LangString" "LicenseLangString"
+    "SubCaption" "UninstallSubCaption"
+    "SetPluginUnload" "DetailPrint" "SetOutPath" "WriteUninstaller"
+    "GetErrorLevel" "SetErrorLevel" "GetInstDirError" "SetRegView" "SetShellVarContext"
+    "SetDateSave" "SetDatablockOptimize" "BGGradient" "InstallColors" "CheckBitmap" "SilentInstall" "SetOverwrite"
+    "SetCompress"
+    )
+  '(
+    ("!\\(insertmacro\\|define\\|ifdef\\|ifndef\\|else\\|endif\\|echo\\|verbose\\|include\\|macroend\\|macro\\|undef\\|packhdr\\|warning\\|error\\)" (1 'font-lock-builtin-face))
+    ("$[({]?\\([A-Za-z0-9_]+\\)[)}]?" (1 'font-lock-variable-name-face))
+    ("^[[:blank:]]*\\([[:alpha:].][[:alnum:]_.]*:\\)\\([^:]\\|$\\)" (1 'font-lock-function-name-face))
+    ("^[[:blank:]]*\\(Function\\|Goto\\|Call\\)[[:blank:]]+\\([[:alnum:]_.]*\\)" (2 'font-lock-function-name-face))
+    )
+  (list "\\.\\(nsi\\|nsh\\)$")
+  nil
+  "Generic mode for nsis files.")
+
+(provide 'nsis-mode)
+
+;;; nsis-mode.el ends here