# HG changeset patch # User Oleksandr Gavenko # Date 1264702825 -7200 # Node ID 61173396cfe43608eb9fa807c1d7b4247af5def4 # Parent 81c80df45b378f3eca7bdbbeb67fb7a298d8d158 Template directory renamed to 'lisp' directory. diff -r 81c80df45b37 -r 61173396cfe4 Makefile --- a/Makefile Thu Jan 28 20:15:56 2010 +0200 +++ b/Makefile Thu Jan 28 20:20:25 2010 +0200 @@ -13,7 +13,7 @@ cp .emacs-post $(HOME)/.emacs-post .PHONY: install -install: .emacs .emacs-my .emacs-pre .emacs-post $(wildcard template-pre/*.el) +install: .emacs .emacs-my .emacs-pre .emacs-post $(wildcard lisp/*.el) for file in .emacs-pre .emacs-post; do \ if [ ! -f $(HOME)/$$file ]; then cp $$file $(HOME)/$$file; fi; \ done @@ -21,7 +21,7 @@ cp .emacs-my $(HOME)/.emacs-my rm -r $(HOME)/.emacs.d/my mkdir -p $(HOME)/.emacs.d/my - for file in $(wildcard template-pre/*.el); do \ + for file in $(wildcard lisp/*.el); do \ cp -f $$file $(HOME)/.emacs.d/my; \ done diff -r 81c80df45b37 -r 61173396cfe4 lisp/iar-linker-config-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/iar-linker-config-mode.el Thu Jan 28 20:20:25 2010 +0200 @@ -0,0 +1,68 @@ +;;; iar-linker-config-mode.el --- major mode for highlighting IAR Embedded Workbench 5.x linker scripts + +;; Copyright (C) 2009, 2010 by Oleksandr Gavenko + +;; 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: + +(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 81c80df45b37 -r 61173396cfe4 lisp/iar4-linker-config-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/iar4-linker-config-mode.el Thu Jan 28 20:20:25 2010 +0200 @@ -0,0 +1,50 @@ +;;; iar-linker-config-mode.el --- major mode for highlighting IAR Embedded Workbench 4.x linker scripts + +;; Copyright (C) 2009, 2010 by Oleksandr Gavenko + +;; 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: + +(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 81c80df45b37 -r 61173396cfe4 lisp/nsis-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/nsis-mode.el Thu Jan 28 20:20:25 2010 +0200 @@ -0,0 +1,30 @@ +;;; iar-linker-config-mode.el --- major mode for highlighting NSIS scripts + +;; Copyright (C) 2009, 2010 by Oleksandr Gavenko + +;; Author: Oleksandr Gavenko +;; Maintainer: Oleksandr Gavenko +;; Created: 2009-09-14 +;; Version: 0.1 +;; Keywords: languages + +;;; Commentary: +;; +;; Very pure syntax highlighting. + +;;; Code: + +(when (eq window-system 'w32) + (define-generic-mode 'nsis-generic-mode + (list ?\;) + '("Section" "SectionEnd" "Function" "FunctionEnd" "Call" "Goto") + '(("!\\([A-Za-z]+\\)" (1 'font-lock-builtin-face)) + ("$[({]?\\([A-Za-z0-9_]+\\)[)}]?" (1 'font-lock-variable-name-face)) + ) + (list "\\.\\(nsi\\|nsh\\)$") + nil + "Generic mode for nsis files.")) + +(provide 'nsis-mode) + +;;; nsis-mode.el ends here diff -r 81c80df45b37 -r 61173396cfe4 template-pre/iar-linker-config-mode.el --- a/template-pre/iar-linker-config-mode.el Thu Jan 28 20:15:56 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +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 - -;; 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: - -(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 81c80df45b37 -r 61173396cfe4 template-pre/iar4-linker-config-mode.el --- a/template-pre/iar4-linker-config-mode.el Thu Jan 28 20:15:56 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +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 - -;; 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: - -(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 81c80df45b37 -r 61173396cfe4 template-pre/nsis-mode.el --- a/template-pre/nsis-mode.el Thu Jan 28 20:15:56 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -;;; iar-linker-config-mode.el --- major mode for highlighting NSIS scripts - -;; Copyright (C) 2009, 2010 by Oleksandr Gavenko - -;; Author: Oleksandr Gavenko -;; Maintainer: Oleksandr Gavenko -;; Created: 2009-09-14 -;; Version: 0.1 -;; Keywords: languages - -;;; Commentary: -;; -;; Very pure syntax highlighting. - -;;; Code: - -(when (eq window-system 'w32) - (define-generic-mode 'nsis-generic-mode - (list ?\;) - '("Section" "SectionEnd" "Function" "FunctionEnd" "Call" "Goto") - '(("!\\([A-Za-z]+\\)" (1 'font-lock-builtin-face)) - ("$[({]?\\([A-Za-z0-9_]+\\)[)}]?" (1 'font-lock-variable-name-face)) - ) - (list "\\.\\(nsi\\|nsh\\)$") - nil - "Generic mode for nsis files.")) - -(provide 'nsis-mode) - -;;; nsis-mode.el ends here