nsis-mode.el
changeset 318 6a430707c23e
parent 310 dca63c827ac1
child 320 2c4a6d477785
equal deleted inserted replaced
317:686aa3fcc3a4 318:6a430707c23e
       
     1 ;;; iar-linker-config-mode.el --- major mode for highlighting NSIS scripts
       
     2 
       
     3 ;; Copyright (C) 2009, 2010 by Oleksandr Gavenko <gavenkoa@gmail.com>
       
     4 
       
     5 ;; You can do anything with this file without any warranty.
       
     6 
       
     7 ;; Author: Oleksandr Gavenko <gavenkoa@gmail.com>
       
     8 ;; Maintainer: Oleksandr Gavenko <gavenkoa@gmail.com>
       
     9 ;; Created: 2009-09-14
       
    10 ;; Version: 0.1
       
    11 ;; Keywords: languages
       
    12 
       
    13 ;;; Commentary:
       
    14 ;;
       
    15 ;; Very pure syntax highlighting.
       
    16 
       
    17 ;;; Code:
       
    18 
       
    19 ;;;###autoload
       
    20 (define-generic-mode 'nsis-mode
       
    21   (list ?\; ?\# '("/*" . "*/"))
       
    22   '(
       
    23     "Section" "SectionEnd" "SectionIn" "SectionGroup" "SectionGroupEnd" "Function" "FunctionEnd" "File"
       
    24     "SectionSetFlags" "SectionGetFlags" "SectionSetText" "SectionGetText" "SectionSetInstTypes" "SectionGetInstTypes" "SectionSetSize" "SectionGetSize" "SetCurInstType" "GetCurInstType" "InstTypeSetText" "InstTypeGetText"
       
    25     "Name" "ShowInstDetails" "Caption"
       
    26     "LicenseText" "LicenseData" "LicenseForceSelection" "ComponentText" "BrandingText" "DetailsButtonText" "CompletedText" "UninstallText"
       
    27     "DirText" "DirVar" "DirVerify"
       
    28     "Exec" "ExecWait" "ExecShell" "Goto" "goto" "Call" "Return" "Abort" "Quit" "ClearErrors" "SetErrors"
       
    29     "Reboot" "SetRebootFlag"
       
    30     "IfSilent" "IfAbort" "IfRebootFlag" "IfErrors" "IfFileExists"
       
    31     "GetCurrentAddress" "GetFunctionAddress" "GetLabelAddress"
       
    32     "Page" "UninstPage" "PageEx" "PageCallbacks" "PageExEnd"
       
    33     "Delete" "CopyFiles" "CreateDirectory" "RMDir" "OutFile" "ReserveFile" "CreateShortCut"
       
    34     "CallInstDLL" "GetDLLVersion" "GetDLLVersionLocal" "RegDLL" "UnRegDLL"
       
    35     "GetFileTime" "GetFileTimeLocal" "GetFullPathName" "GetTempFileName" "SearchPath" "SetFileAttributes"
       
    36     "ReadRegStr" "WriteRegStr" "DeleteRegKey" "DeleteRegValue" "EnumRegKey" "EnumRegValue" "WriteRegDWORD" "ReadRegDWORD" "WriteRegDword" "WriteRegBin" "WriteRegDWORD" "WriteRegExpandStr"
       
    37     "ExpandEnvStrings" "ReadEnvStr"
       
    38     "DeleteINISec" "DeleteINIStr" "FlushINI" "ReadINIStr" "WriteINIStr"
       
    39     "Var" "Pop" "Push" "Exch"
       
    40     "StrLen" "StrCpy" "StrCmp" "StrCmpS" "IntCmp" "IntCmpU" "IntFmt" "IntOp"
       
    41     "FileClose" "FileOpen" "FileRead" "FileReadByte" "FileSeek" "FileWrite" "FileWriteByte" "FindClose" "FindFirst" "FindNext"
       
    42     "InitPluginsDir" "addplugindir" "InstallDir" "InstallDirRegKey" "InstType" "Nop" "Sleep"
       
    43     "RequestExecutionLevel" "CRCCheck" "XPStyle"
       
    44     "ReadIniStr" "WriteIniStr"
       
    45     "LogSet" "LogText"
       
    46     "Icon" "UninstallIcon"
       
    47     "SendMessage" "MessageBox" "GetDlgItem"
       
    48     "FindWindow" "EnableWindow" "LockWindow" "ShowWindow" "HideWindow" "IsWindow" "AutoCloseWindow"
       
    49     "SetAutoClose" "CreateFont" "SetCtlColors" "SetBrandingImage" "SetDetailsView" "SetDetailsPrint" "SetSilent" "BringToFront" "DetailPrint"
       
    50     "LoadLanguageFile" "LangString" "LicenseLangString"
       
    51     "SubCaption" "UninstallSubCaption"
       
    52     "SetPluginUnload" "DetailPrint" "SetOutPath" "WriteUninstaller"
       
    53     "GetErrorLevel" "SetErrorLevel" "GetInstDirError" "SetRegView" "SetShellVarContext"
       
    54     "SetDateSave" "SetDatablockOptimize" "BGGradient" "InstallColors" "CheckBitmap" "SilentInstall" "SetOverwrite"
       
    55     "SetCompress"
       
    56     )
       
    57   '(
       
    58     ("!\\(insertmacro\\|define\\|ifdef\\|ifndef\\|else\\|endif\\|echo\\|verbose\\|include\\|macroend\\|macro\\|undef\\|packhdr\\|warning\\|error\\)" (1 'font-lock-builtin-face))
       
    59     ("$[({]?\\([A-Za-z0-9_]+\\)[)}]?" (1 'font-lock-variable-name-face))
       
    60     ("^[[:blank:]]*\\([[:alpha:].][[:alnum:]_.]*:\\)\\([^:]\\|$\\)" (1 'font-lock-function-name-face))
       
    61     ("^[[:blank:]]*\\(Function\\|Goto\\|Call\\)[[:blank:]]+\\([[:alnum:]_.]*\\)" (2 'font-lock-function-name-face))
       
    62     )
       
    63   (list "\\.\\(nsi\\|nsh\\)$")
       
    64   nil
       
    65   "Generic mode for nsis files.")
       
    66 
       
    67 (provide 'nsis-mode)
       
    68 
       
    69 ;;; nsis-mode.el ends here