Moved some obsolete modes to attic.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 01 Jan 2021 20:32:49 +0200
changeset 1662 f697f2772ec9
parent 1661 e4711ae3529f
child 1663 a0494ee73d5f
Moved some obsolete modes to attic.
company-dom.el
iar-linker-config-mode.el
iar4-linker-config-mode.el
mylisp-obsolete/company-dom.el
mylisp-obsolete/iar-linker-config-mode.el
mylisp-obsolete/iar4-linker-config-mode.el
mylisp-obsolete/nsis-mode.el
nsis-mode.el
--- a/company-dom.el	Fri Jan 01 20:21:33 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-(require 'company)
-(require 'cl-lib)
-(require 'web-mode)
-
-(unless (fboundp 'web-mode-language-at-pos)
-  (defun web-mode-language-at-pos (&optional pos)
-    (plist-get (web-mode-point-context (or pos (point))) :language)))
-
-(defvar company-dom--document-methods
-  '("getElementById" "getElementsByClassName" "createElement" "createElementNS" "createEvent"))
-
-(defvar company-dom--window-methods
-  '("console" "document" "location"))
-
-(defun company-dom--prefix ()
-  (when (looking-back "\\<\\w+\\(?:\\.?\\w+\\>\\|\\.\\)")
-    (match-string 0)))
-
-(defun company-dom--candidates (prefix)
-  (cond
-   ((string-match "^window\\.\\(.*\\)" prefix)
-    (mapcar
-     (lambda (str) (concat "window." str))
-     (all-completions (match-string 1) company-dom--window-methods)))
-   ((string-match "^document\\.\\(.*\\)" prefix)
-    (mapcar
-     (lambda (str) (concat "document." str))
-     (all-completions (match-string 1) company-dom--document-methods)))
-   (t
-    (all-completions prefix '("document" "window")))
-   ))
-
-(defun company-web (command &optional arg &rest ignored)
-  (interactive (list 'interactive))
-  (cl-case command
-    (interactive (company-begin-backend 'company-web))
-    (prefix
-     (pcase (plist-get (web-mode-point-context (point)) :language)
-       ("css" (company-css 'prefix))
-       ("javascript" (company-dom--prefix))))
-    (candidates
-     (pcase (plist-get (web-mode-point-context (point)) :language)
-       ("css" (company-css 'candidates arg))
-       ("javascript" (company-dom--candidates arg))))
-    (meta (format "This value is named %s" arg))))
-
-(defun company-web-register ()
-  (set (make-local-variable 'company-backends) '(company-web)))
-
-(add-hook 'web-mode-hook #'company-web-register)
-
-;; Debug company with M-x company-diag.
--- a/iar-linker-config-mode.el	Fri Jan 01 20:21:33 2021 +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 <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-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
--- a/iar4-linker-config-mode.el	Fri Jan 01 20:21:33 2021 +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 <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-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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mylisp-obsolete/company-dom.el	Fri Jan 01 20:32:49 2021 +0200
@@ -0,0 +1,52 @@
+(require 'company)
+(require 'cl-lib)
+(require 'web-mode)
+
+(unless (fboundp 'web-mode-language-at-pos)
+  (defun web-mode-language-at-pos (&optional pos)
+    (plist-get (web-mode-point-context (or pos (point))) :language)))
+
+(defvar company-dom--document-methods
+  '("getElementById" "getElementsByClassName" "createElement" "createElementNS" "createEvent"))
+
+(defvar company-dom--window-methods
+  '("console" "document" "location"))
+
+(defun company-dom--prefix ()
+  (when (looking-back "\\<\\w+\\(?:\\.?\\w+\\>\\|\\.\\)")
+    (match-string 0)))
+
+(defun company-dom--candidates (prefix)
+  (cond
+   ((string-match "^window\\.\\(.*\\)" prefix)
+    (mapcar
+     (lambda (str) (concat "window." str))
+     (all-completions (match-string 1) company-dom--window-methods)))
+   ((string-match "^document\\.\\(.*\\)" prefix)
+    (mapcar
+     (lambda (str) (concat "document." str))
+     (all-completions (match-string 1) company-dom--document-methods)))
+   (t
+    (all-completions prefix '("document" "window")))
+   ))
+
+(defun company-web (command &optional arg &rest ignored)
+  (interactive (list 'interactive))
+  (cl-case command
+    (interactive (company-begin-backend 'company-web))
+    (prefix
+     (pcase (plist-get (web-mode-point-context (point)) :language)
+       ("css" (company-css 'prefix))
+       ("javascript" (company-dom--prefix))))
+    (candidates
+     (pcase (plist-get (web-mode-point-context (point)) :language)
+       ("css" (company-css 'candidates arg))
+       ("javascript" (company-dom--candidates arg))))
+    (meta (format "This value is named %s" arg))))
+
+(defun company-web-register ()
+  (set (make-local-variable 'company-backends) '(company-web)))
+
+(add-hook 'web-mode-hook #'company-web-register)
+
+;; Debug company with M-x company-diag.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mylisp-obsolete/iar-linker-config-mode.el	Fri Jan 01 20:32:49 2021 +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 <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-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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mylisp-obsolete/iar4-linker-config-mode.el	Fri Jan 01 20:32:49 2021 +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 <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-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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mylisp-obsolete/nsis-mode.el	Fri Jan 01 20:32:49 2021 +0200
@@ -0,0 +1,104 @@
+;;; 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:
+
+(defun nsis-mode-modify-syntax-entry ()
+  (modify-syntax-entry ?_ "w")
+  (modify-syntax-entry ?. "w")
+  (modify-syntax-entry ?$ ".")
+  )
+
+(defun nsis-mode-set-comment-style ()
+  (set (make-local-variable 'comment-start) "; ")
+  (set (make-local-variable 'comment-continue) nil)
+  (set (make-local-variable 'comment-end) "")
+  (set (make-local-variable 'comment-end-skip) nil)
+  (set (make-local-variable 'comment-multi-line) nil)
+  (set (make-local-variable 'comment-use-syntax) t)
+  )
+
+;;;###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))
+    )
+  '("\\.nsi\\'" "\\.nsh\\'")
+  '(nsis-mode-modify-syntax-entry nsis-mode-set-comment-style)
+  "Generic mode for nsis files.")
+
+(defvar nsis-imenu-generic-expression
+      '(
+        ("Defines"  "^!define[[:blank:]]+\\([[:word:]]+\\)" 1)
+        ("Sections"  "^Section[[:blank:]]+\"?\\(-?[[:word:] ]+\\)\"?" 1)
+        ("Functions"  "^Function[[:blank:]]+\\([[:word:]]+\\)" 1)
+        ("Macros"  "^!macro[[:blank:]]+\\([[:word:]]+\\)" 1)
+        ))
+
+(defun nsis-set-imenu-generic-expression ()
+  (setq imenu-generic-expression nsis-imenu-generic-expression)
+  )
+
+(add-hook 'nsis-mode-hook 'nsis-set-imenu-generic-expression)
+
+(eval-when-compile
+  (defvar which-func-modes))
+
+(eval-after-load 'which-func
+  '(add-to-list 'which-func-modes 'nsis-mode))
+
+(provide 'nsis-mode)
+
+;;; nsis-mode.el ends here
--- a/nsis-mode.el	Fri Jan 01 20:21:33 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-;;; 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:
-
-(defun nsis-mode-modify-syntax-entry ()
-  (modify-syntax-entry ?_ "w")
-  (modify-syntax-entry ?. "w")
-  (modify-syntax-entry ?$ ".")
-  )
-
-(defun nsis-mode-set-comment-style ()
-  (set (make-local-variable 'comment-start) "; ")
-  (set (make-local-variable 'comment-continue) nil)
-  (set (make-local-variable 'comment-end) "")
-  (set (make-local-variable 'comment-end-skip) nil)
-  (set (make-local-variable 'comment-multi-line) nil)
-  (set (make-local-variable 'comment-use-syntax) t)
-  )
-
-;;;###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))
-    )
-  '("\\.nsi\\'" "\\.nsh\\'")
-  '(nsis-mode-modify-syntax-entry nsis-mode-set-comment-style)
-  "Generic mode for nsis files.")
-
-(defvar nsis-imenu-generic-expression
-      '(
-        ("Defines"  "^!define[[:blank:]]+\\([[:word:]]+\\)" 1)
-        ("Sections"  "^Section[[:blank:]]+\"?\\(-?[[:word:] ]+\\)\"?" 1)
-        ("Functions"  "^Function[[:blank:]]+\\([[:word:]]+\\)" 1)
-        ("Macros"  "^!macro[[:blank:]]+\\([[:word:]]+\\)" 1)
-        ))
-
-(defun nsis-set-imenu-generic-expression ()
-  (setq imenu-generic-expression nsis-imenu-generic-expression)
-  )
-
-(add-hook 'nsis-mode-hook 'nsis-set-imenu-generic-expression)
-
-(eval-when-compile
-  (defvar which-func-modes))
-
-(eval-after-load 'which-func
-  '(add-to-list 'which-func-modes 'nsis-mode))
-
-(provide 'nsis-mode)
-
-;;; nsis-mode.el ends here