# HG changeset patch # User Oleksandr Gavenko # Date 1266832177 -7200 # Node ID 6a430707c23e46f88d82c2e5baa6630eb24bcda4 # Parent 686aa3fcc3a4939003a6faab22220c278a9a0eea Store all files in current dir for easy access to they. diff -r 686aa3fcc3a4 -r 6a430707c23e Makefile --- a/Makefile Mon Feb 22 11:42:38 2010 +0200 +++ b/Makefile Mon Feb 22 11:49:37 2010 +0200 @@ -6,6 +6,8 @@ $(error Home env var not set!) endif +FILES_MODE_EL := $(wildcard *-mode.el) + .PHONY: all all: install @@ -15,7 +17,7 @@ cp .emacs-post $(HOME)/.emacs-post .PHONY: install -install: .emacs .emacs-my .emacs-pre .emacs-post $(wildcard lisp/*.el) +install: .emacs .emacs-my .emacs-pre .emacs-post $(FILES_MODE_EL) for file in .emacs-pre .emacs-post; do \ if [ ! -f $(HOME)/$$file ]; then cp $$file $(HOME)/$$file; fi; \ done @@ -23,7 +25,7 @@ cp .emacs-my $(HOME)/.emacs-my rm -f -r $(HOME)/.emacs.d/my-lisp mkdir -p $(HOME)/.emacs.d/my-lisp - for file in $(wildcard lisp/*.el); do \ + for file in $(FILES_MODE_EL); do \ cp -f $$file $(HOME)/.emacs.d/my-lisp; \ done emacs --batch \ diff -r 686aa3fcc3a4 -r 6a430707c23e bat-file-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bat-file-mode.el Mon Feb 22 11:49:37 2010 +0200 @@ -0,0 +1,62 @@ +;;; bat-file-mode.el --- batch file major mode + +;; Copyright (C) 2010 by Oleksandr Gavenko + +;; You can do anything with this file without any warranty. + +;; Author: Oleksandr Gavenko +;; Maintainer: Oleksandr Gavenko +;; Created: 2010-01-28 +;; Version: 0.1 +;; Keywords: languages + +;;; Commentary: +;; +;; Very pure highlighting and not all available syntax. + +;;; Code: + +;;;###autoload +(define-generic-mode 'bat-file-mode + (list "REM " ":: ") + nil + '( + ("\\(:[[:alnum:]_]+\\)" (1 'font-lock-function-name-face)) + ("\\<\\([iI][fF]\\|[eE][lL][sS][eE]\\|[fF][oO][rR]\\|[iI][nN]\\|[dD][oO]\\|[gG][oO][tT][oO]\ +\\|[nN][oO][tT]\\|[eE][rR][rR][oO][rR][lL][eE][vV][eE][lL]\\|[eE][xX][iI][sS][tT]\ +\\|[dD][eE][fF][iI][nN][eE][dD]\\|[cC][mM][dD][eE][xX][tT][vV][eE][rR][sS][iI][oO][nN]\ +\\|[pP][aA][uU][sS][eE]\\|[eE][cC][hH][oO]\\|[pP][rR][oO][mM][pP][tT]\ +\\|[pP][rR][oO][mM][pP][tT]\\|[cC][aA][lL][lL]\\|[sS][eE][tT]\\|[sS][tT][aA][rR][tT]\\|[eE][xX][iI][tT]\ +\\|[cC][dD]\\|[cC][hH][dD][iI][rR]\\|[pP][uU][sS][hH][dD]\\|[pP][oO][pP][dD]\\|[cC][lL][sS]\ +\\|[cC][mM][dD]\\|[vV][eE][rR]\ +\\|[dD][eE][lL][eE][tT][eE]\\|[dD][eE][lL]\\|[cC][oO][pP][yY]\ +\\)\\>" (1 'font-lock-keyword-face)) + ("\\(:[[:alpha:]][[:alnum:]_]*\\)" (1 'font-lock-function-name-face)) + ("[gG][oO][tT][oO][[:blank:]]+\\([[:alpha:]][[:alnum:]_]*\\)" (1 'font-lock-function-name-face)) + ("[cC][aA][lL][lL][[:blank:]]+\\(:[[:alpha:]][[:alnum:]_]*\\)" (1 'font-lock-function-name-face)) + ("\\(%[[:digit:]]\\|%%[[:alpha:]]\\|%[[:alpha:]][[:alnum:]_]*%\\)" (1 'font-lock-variable-name-face)) + ("[sS][eE][tT][[:blank:]]+\\([[:alpha:]][[:alnum:]_]*\\)[[:blank:]]*=" (1 'font-lock-variable-name-face)) + ("[[:blank:]]+\\([-/][[:alnum:]_.]+\\)" (1 'font-lock-preprocessor-face)) + ;; ("\\(\\%[a-z]\\)" (1 'font-lock-reference-face)) + ;; ("\\(%\\sw+%\\)" (1 'font-lock-reference-face)) + ;; ("\\(%[0-9]\\)" (1 'font-lock-reference-face)) + ) + (list "\\.\\([bB][aA][tT]\\|[cC][mM][dD]\\)$") + nil + "Generic mode for batch files.") + +(add-hook + 'bat-file-mode-hook + (lambda () + (modify-syntax-entry ?\" "\"") + (modify-syntax-entry ?' "\"") + (modify-syntax-entry ?\\ "\\") + (modify-syntax-entry ?% ".") + (modify-syntax-entry ?= ".") + (modify-syntax-entry ?_ "w") + ) + ) + +(provide 'bat-file-mode) + +;;; bat-file-mode.el ends here diff -r 686aa3fcc3a4 -r 6a430707c23e iar-linker-config-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/iar-linker-config-mode.el Mon Feb 22 11:49:37 2010 +0200 @@ -0,0 +1,71 @@ +;;; iar-linker-config-mode.el --- major mode for highlighting IAR Embedded Workbench 5.x linker scripts + +;; Copyright (C) 2009, 2010 by Oleksandr Gavenko + +;; You can do anything with this file without any warranty. + +;; Author: Oleksandr Gavenko +;; Maintainer: Oleksandr Gavenko +;; Created: 2009-11-08 +;; Version: 0.1 +;; Keywords: languages + +;;; Commentary: +;; +;; Very pure highlighting and not all available syntax. + +;;; Code: + +;;;###autoload +(define-generic-mode iar-linker-config-mode + '("// " ("/*" . "*/")) + '("zeroinit" "code" "readwrite" "rw" "readonly" "ro") + '( + ("\\(define +symbol\\) +\\([_a-zA-Z0-9]+\\) *= *\\(0x[0-9a-fA-F]+\\);" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) + (3 font-lock-constant-face) ) + ("\\(define +memory\\) +\\([_a-zA-Z]+\\) +\\(with +size\\) = \\(0x[0-9a-fA-F]+\\|[0-9]+\\)[GMK]?;" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) + (3 font-lock-keyword-face) + (4 font-lock-constant-face) ) + ("\\([_a-zA-Z]+\\):\\[\\(from\\) +\\([_a-zA-Z0-9]+\\) +\\(to\\|size\\) +\\([_a-zA-Z0-9]+\\)\\]" + (1 font-lock-variable-name-face) + (2 font-lock-keyword-face) + (3 font-lock-variable-name-face) + (4 font-lock-keyword-face) + (5 font-lock-variable-name-face) ) + ("\\(define +region\\) +\\([_a-zA-Z]+\\) *=" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) ) + ("\\(define +block\\) +\\([_a-zA-Z]+\\) +\\(with +alignment\\) *= *[0-9]+, *\\(size\\) *= *\\([_a-zA-Z]+\\).*;" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) + (3 font-lock-keyword-face) + (4 font-lock-keyword-face) + (5 font-lock-variable-name-face) ) + ("\\(do +not +initialize\\) *{" + (1 font-lock-keyword-face) ) + ("\\(place +in\\) +\\([_a-zA-Z]+\\) *{" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) ) + ("\\(place +at +address\\) +\\([_a-zA-Z]+\\):\\([_a-zA-Z]+\\) *{" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) + (3 font-lock-variable-name-face) ) + ("\\(initialize by copy\\) *{" + (1 font-lock-keyword-face) ) + ("\\(block\\|section\\) +\\([_.a-zA-Z0-9]+\\)" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) ) + ) + (list "\\.\\(icf\\)\\'") + (list + (lambda () (setq comment-start "/* " comment-end " */")) + ) + "Generic mode for iar linker config files.") + +(provide 'iar-linker-config-mode) + +;;; iar-linker-config-mode.el ends here diff -r 686aa3fcc3a4 -r 6a430707c23e iar4-linker-config-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/iar4-linker-config-mode.el Mon Feb 22 11:49:37 2010 +0200 @@ -0,0 +1,53 @@ +;;; iar-linker-config-mode.el --- major mode for highlighting IAR Embedded Workbench 4.x linker scripts + +;; Copyright (C) 2009, 2010 by Oleksandr Gavenko + +;; You can do anything with this file without any warranty. + +;; Author: Oleksandr Gavenko +;; Maintainer: Oleksandr Gavenko +;; Created: 2009-11-04 +;; Version: 0.1 +;; Keywords: languages + +;;; Commentary: +;; +;; Very pure highlighting and not all available syntax. + +;;; Code: + +;;;###autoload +(define-generic-mode iar4-linker-config-mode + '("// " ("/*" . "*/")) + nil + '( + ("^\\(-c\\)\\([_a-zA-Z]+\\)" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) ) + ("^\\(-D\\)\\([_a-zA-Z0-9]+\\)=\\(\\(0x\\)?[0-9a-fA-F]+\\|.[0-9]+\\)" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) + (3 font-lock-constant-face) ) + ("^\\(-Q\\)\\([_a-zA-Z]+\\)=\\([_a-zA-Z]+\\)" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) + (3 font-lock-variable-name-face) ) + ("^\\(-Z\\|-P\\|-b\\)(\\([_a-zA-Z]+\\))\\([_a-zA-Z]+\\)=" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) + (3 font-lock-variable-name-face) ) + ("^\\(-Z\\|-P\\|-b\\)(\\([_a-zA-Z]+\\))\\([_a-zA-Z]+\\)\\+\\([_a-zA-Z]+\\)=" + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face) + (3 font-lock-variable-name-face) + (4 font-lock-variable-name-face) ) + ) + (list "\\.\\(xcl\\)\\'") + (list + (lambda () (setq comment-start "// " comment-end "")) + ) + "Generic mode for iar linker config files.") + +(provide 'iar4-linker-config-mode) + +;;; iar4-linker-config-mode.el ends here diff -r 686aa3fcc3a4 -r 6a430707c23e lisp/bat-file-mode.el --- a/lisp/bat-file-mode.el Mon Feb 22 11:42:38 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -;;; bat-file-mode.el --- batch file major mode - -;; Copyright (C) 2010 by Oleksandr Gavenko - -;; You can do anything with this file without any warranty. - -;; Author: Oleksandr Gavenko -;; Maintainer: Oleksandr Gavenko -;; Created: 2010-01-28 -;; Version: 0.1 -;; Keywords: languages - -;;; Commentary: -;; -;; Very pure highlighting and not all available syntax. - -;;; Code: - -;;;###autoload -(define-generic-mode 'bat-file-mode - (list "REM " ":: ") - nil - '( - ("\\(:[[:alnum:]_]+\\)" (1 'font-lock-function-name-face)) - ("\\<\\([iI][fF]\\|[eE][lL][sS][eE]\\|[fF][oO][rR]\\|[iI][nN]\\|[dD][oO]\\|[gG][oO][tT][oO]\ -\\|[nN][oO][tT]\\|[eE][rR][rR][oO][rR][lL][eE][vV][eE][lL]\\|[eE][xX][iI][sS][tT]\ -\\|[dD][eE][fF][iI][nN][eE][dD]\\|[cC][mM][dD][eE][xX][tT][vV][eE][rR][sS][iI][oO][nN]\ -\\|[pP][aA][uU][sS][eE]\\|[eE][cC][hH][oO]\\|[pP][rR][oO][mM][pP][tT]\ -\\|[pP][rR][oO][mM][pP][tT]\\|[cC][aA][lL][lL]\\|[sS][eE][tT]\\|[sS][tT][aA][rR][tT]\\|[eE][xX][iI][tT]\ -\\|[cC][dD]\\|[cC][hH][dD][iI][rR]\\|[pP][uU][sS][hH][dD]\\|[pP][oO][pP][dD]\\|[cC][lL][sS]\ -\\|[cC][mM][dD]\\|[vV][eE][rR]\ -\\|[dD][eE][lL][eE][tT][eE]\\|[dD][eE][lL]\\|[cC][oO][pP][yY]\ -\\)\\>" (1 'font-lock-keyword-face)) - ("\\(:[[:alpha:]][[:alnum:]_]*\\)" (1 'font-lock-function-name-face)) - ("[gG][oO][tT][oO][[:blank:]]+\\([[:alpha:]][[:alnum:]_]*\\)" (1 'font-lock-function-name-face)) - ("[cC][aA][lL][lL][[:blank:]]+\\(:[[:alpha:]][[:alnum:]_]*\\)" (1 'font-lock-function-name-face)) - ("\\(%[[:digit:]]\\|%%[[:alpha:]]\\|%[[:alpha:]][[:alnum:]_]*%\\)" (1 'font-lock-variable-name-face)) - ("[sS][eE][tT][[:blank:]]+\\([[:alpha:]][[:alnum:]_]*\\)[[:blank:]]*=" (1 'font-lock-variable-name-face)) - ("[[:blank:]]+\\([-/][[:alnum:]_.]+\\)" (1 'font-lock-preprocessor-face)) - ;; ("\\(\\%[a-z]\\)" (1 'font-lock-reference-face)) - ;; ("\\(%\\sw+%\\)" (1 'font-lock-reference-face)) - ;; ("\\(%[0-9]\\)" (1 'font-lock-reference-face)) - ) - (list "\\.\\([bB][aA][tT]\\|[cC][mM][dD]\\)$") - nil - "Generic mode for batch files.") - -(add-hook - 'bat-file-mode-hook - (lambda () - (modify-syntax-entry ?\" "\"") - (modify-syntax-entry ?' "\"") - (modify-syntax-entry ?\\ "\\") - (modify-syntax-entry ?% ".") - (modify-syntax-entry ?= ".") - (modify-syntax-entry ?_ "w") - ) - ) - -(provide 'bat-file-mode) - -;;; bat-file-mode.el ends here diff -r 686aa3fcc3a4 -r 6a430707c23e lisp/iar-linker-config-mode.el --- a/lisp/iar-linker-config-mode.el Mon Feb 22 11:42:38 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -;;; iar-linker-config-mode.el --- major mode for highlighting IAR Embedded Workbench 5.x linker scripts - -;; Copyright (C) 2009, 2010 by Oleksandr Gavenko - -;; You can do anything with this file without any warranty. - -;; Author: Oleksandr Gavenko -;; Maintainer: Oleksandr Gavenko -;; Created: 2009-11-08 -;; Version: 0.1 -;; Keywords: languages - -;;; Commentary: -;; -;; Very pure highlighting and not all available syntax. - -;;; Code: - -;;;###autoload -(define-generic-mode iar-linker-config-mode - '("// " ("/*" . "*/")) - '("zeroinit" "code" "readwrite" "rw" "readonly" "ro") - '( - ("\\(define +symbol\\) +\\([_a-zA-Z0-9]+\\) *= *\\(0x[0-9a-fA-F]+\\);" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) - (3 font-lock-constant-face) ) - ("\\(define +memory\\) +\\([_a-zA-Z]+\\) +\\(with +size\\) = \\(0x[0-9a-fA-F]+\\|[0-9]+\\)[GMK]?;" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) - (3 font-lock-keyword-face) - (4 font-lock-constant-face) ) - ("\\([_a-zA-Z]+\\):\\[\\(from\\) +\\([_a-zA-Z0-9]+\\) +\\(to\\|size\\) +\\([_a-zA-Z0-9]+\\)\\]" - (1 font-lock-variable-name-face) - (2 font-lock-keyword-face) - (3 font-lock-variable-name-face) - (4 font-lock-keyword-face) - (5 font-lock-variable-name-face) ) - ("\\(define +region\\) +\\([_a-zA-Z]+\\) *=" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) ) - ("\\(define +block\\) +\\([_a-zA-Z]+\\) +\\(with +alignment\\) *= *[0-9]+, *\\(size\\) *= *\\([_a-zA-Z]+\\).*;" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) - (3 font-lock-keyword-face) - (4 font-lock-keyword-face) - (5 font-lock-variable-name-face) ) - ("\\(do +not +initialize\\) *{" - (1 font-lock-keyword-face) ) - ("\\(place +in\\) +\\([_a-zA-Z]+\\) *{" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) ) - ("\\(place +at +address\\) +\\([_a-zA-Z]+\\):\\([_a-zA-Z]+\\) *{" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) - (3 font-lock-variable-name-face) ) - ("\\(initialize by copy\\) *{" - (1 font-lock-keyword-face) ) - ("\\(block\\|section\\) +\\([_.a-zA-Z0-9]+\\)" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) ) - ) - (list "\\.\\(icf\\)\\'") - (list - (lambda () (setq comment-start "/* " comment-end " */")) - ) - "Generic mode for iar linker config files.") - -(provide 'iar-linker-config-mode) - -;;; iar-linker-config-mode.el ends here diff -r 686aa3fcc3a4 -r 6a430707c23e lisp/iar4-linker-config-mode.el --- a/lisp/iar4-linker-config-mode.el Mon Feb 22 11:42:38 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -;;; iar-linker-config-mode.el --- major mode for highlighting IAR Embedded Workbench 4.x linker scripts - -;; Copyright (C) 2009, 2010 by Oleksandr Gavenko - -;; You can do anything with this file without any warranty. - -;; Author: Oleksandr Gavenko -;; Maintainer: Oleksandr Gavenko -;; Created: 2009-11-04 -;; Version: 0.1 -;; Keywords: languages - -;;; Commentary: -;; -;; Very pure highlighting and not all available syntax. - -;;; Code: - -;;;###autoload -(define-generic-mode iar4-linker-config-mode - '("// " ("/*" . "*/")) - nil - '( - ("^\\(-c\\)\\([_a-zA-Z]+\\)" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) ) - ("^\\(-D\\)\\([_a-zA-Z0-9]+\\)=\\(\\(0x\\)?[0-9a-fA-F]+\\|.[0-9]+\\)" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) - (3 font-lock-constant-face) ) - ("^\\(-Q\\)\\([_a-zA-Z]+\\)=\\([_a-zA-Z]+\\)" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) - (3 font-lock-variable-name-face) ) - ("^\\(-Z\\|-P\\|-b\\)(\\([_a-zA-Z]+\\))\\([_a-zA-Z]+\\)=" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) - (3 font-lock-variable-name-face) ) - ("^\\(-Z\\|-P\\|-b\\)(\\([_a-zA-Z]+\\))\\([_a-zA-Z]+\\)\\+\\([_a-zA-Z]+\\)=" - (1 font-lock-keyword-face) - (2 font-lock-variable-name-face) - (3 font-lock-variable-name-face) - (4 font-lock-variable-name-face) ) - ) - (list "\\.\\(xcl\\)\\'") - (list - (lambda () (setq comment-start "// " comment-end "")) - ) - "Generic mode for iar linker config files.") - -(provide 'iar4-linker-config-mode) - -;;; iar4-linker-config-mode.el ends here diff -r 686aa3fcc3a4 -r 6a430707c23e lisp/nsis-mode.el --- a/lisp/nsis-mode.el Mon Feb 22 11:42:38 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -;;; iar-linker-config-mode.el --- major mode for highlighting NSIS scripts - -;; Copyright (C) 2009, 2010 by Oleksandr Gavenko - -;; You can do anything with this file without any warranty. - -;; Author: Oleksandr Gavenko -;; Maintainer: Oleksandr Gavenko -;; 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 diff -r 686aa3fcc3a4 -r 6a430707c23e nsis-mode.el --- /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 + +;; You can do anything with this file without any warranty. + +;; Author: Oleksandr Gavenko +;; Maintainer: Oleksandr Gavenko +;; 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