summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2012-04-04 23:20:47 (GMT)
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2012-04-04 23:20:47 (GMT)
commit6609606e75b9462e1203a853ff0876dc23bc0d46 (patch)
tree90bb04986a327ea053964abea142f614860959d6
parentUpdate to an actually released version and fetch it from GitHub directly. (diff)
downloadflameeyes-6609606e.zip
flameeyes-6609606e.tar.gz
flameeyes-6609606e.tar.bz2
Add an actionscript mode for Emacs, with a hacky patch to restore default font-lock faces.
(Portage version: 2.2.0_alpha99/git/Linux x86_64, unsigned Manifest commit)
-rw-r--r--app-emacs/actionscript-mode/ChangeLog8
-rw-r--r--app-emacs/actionscript-mode/Manifest1
-rw-r--r--app-emacs/actionscript-mode/actionscript-mode-7.2.2.ebuild46
-rw-r--r--app-emacs/actionscript-mode/files/50actionscript-mode-gentoo.el6
-rw-r--r--app-emacs/actionscript-mode/files/actionscript-mode-7.2.2-font-lock.patch86
-rw-r--r--app-emacs/actionscript-mode/metadata.xml7
6 files changed, 154 insertions, 0 deletions
diff --git a/app-emacs/actionscript-mode/ChangeLog b/app-emacs/actionscript-mode/ChangeLog
new file mode 100644
index 0000000..955bb7d
--- /dev/null
+++ b/app-emacs/actionscript-mode/ChangeLog
@@ -0,0 +1,8 @@
+*actionscript-mode-7.2.2 (04 Apr 2012)
+
+ 04 Apr 2012; Diego E. Pettenò <flameeyes@gentoo.org>
+ +actionscript-mode-7.2.2.ebuild, +files/50actionscript-mode-gentoo.el,
+ +files/actionscript-mode-7.2.2-font-lock.patch, +metadata.xml:
+ Add an actionscript mode for Emacs, with a hacky patch to restore default
+ font-lock faces.
+
diff --git a/app-emacs/actionscript-mode/Manifest b/app-emacs/actionscript-mode/Manifest
new file mode 100644
index 0000000..a14e54e
--- /dev/null
+++ b/app-emacs/actionscript-mode/Manifest
@@ -0,0 +1 @@
+DIST actionscript-mode-7.2.2.tar.gz 8601 RMD160 eb311229f485e3c296981946cd271ba70a5bb9f9 SHA1 a6badb6769e0aa9a352184c7ce3da3da878b9497 SHA256 183b0191ea42fa22f0f98d83ff4c3dd975f3508168adc9960164cab961442be9
diff --git a/app-emacs/actionscript-mode/actionscript-mode-7.2.2.ebuild b/app-emacs/actionscript-mode/actionscript-mode-7.2.2.ebuild
new file mode 100644
index 0000000..76f4c1f
--- /dev/null
+++ b/app-emacs/actionscript-mode/actionscript-mode-7.2.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit elisp eutils
+
+GITHUB_USER="austinhaas"
+GITHUB_PROJECT="${PN}"
+
+DESCRIPTION="A major mode for GNU emacs for editing ActionScript 3 files."
+HOMEPAGE="https://github.com/austinhaas/actionscript-mode"
+SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND=""
+DEPEND=""
+
+S="${WORKDIR}"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}"/${GITHUB_USER}-${GITHUB_PROJECT}-*
+ epatch "${FILESDIR}"/${P}-font-lock.patch
+}
+
+src_compile() {
+ cd "${WORKDIR}"/${GITHUB_USER}-${GITHUB_PROJECT}-*
+
+ elisp-compile *.el || die "bytecompile failed"
+}
+
+src_install() {
+ cd "${WORKDIR}"/${GITHUB_USER}-${GITHUB_PROJECT}-*
+
+ elisp-install ${PN} *.el || die "elisp-install failed"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die "elisp-site-file-install failed"
+
+ dodoc README.txt
+}
diff --git a/app-emacs/actionscript-mode/files/50actionscript-mode-gentoo.el b/app-emacs/actionscript-mode/files/50actionscript-mode-gentoo.el
new file mode 100644
index 0000000..b20e340
--- /dev/null
+++ b/app-emacs/actionscript-mode/files/50actionscript-mode-gentoo.el
@@ -0,0 +1,6 @@
+;; actionscript-mode site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'actionscript-mode "actionscript-mode" "Major mode for actionscript." t)
+(add-to-list 'auto-mode-alist '("\\.as$" . actionscript-mode))
+(eval-after-load "actionscript-mode" '(load "actionscript-config"))
diff --git a/app-emacs/actionscript-mode/files/actionscript-mode-7.2.2-font-lock.patch b/app-emacs/actionscript-mode/files/actionscript-mode-7.2.2-font-lock.patch
new file mode 100644
index 0000000..71845db
--- /dev/null
+++ b/app-emacs/actionscript-mode/files/actionscript-mode-7.2.2-font-lock.patch
@@ -0,0 +1,86 @@
+diff --git a/actionscript-mode.el b/actionscript-mode.el
+index 668e002..7cd7bc8 100644
+--- a/actionscript-mode.el
++++ b/actionscript-mode.el
+@@ -366,24 +366,24 @@
+ (defconst actionscript-font-lock-keywords-1
+ ;; The following only highlight specific words that exist in the language.
+ (list
+- `(,(regexp-opt preprocessor-kwds 'words) 0 'actionscript-preprocessor-kwds-face)
+- `(,(regexp-opt actionscript-constant-kwds 'words) 0 'actionscript-constant-kwds-face)
+- `(,(regexp-opt actionscript-global-funcs 'words) 0 'actionscript-global-funcs-face)
+- `(,(regexp-opt actionscript-global-props 'words) 0 'actionscript-global-props-face)
++ `(,(regexp-opt preprocessor-kwds 'words) 0 'font-lock-proceprocessor-face)
++ `(,(regexp-opt actionscript-constant-kwds 'words) 0 'font-lock-constant-face)
++ `(,(regexp-opt actionscript-global-funcs 'words) 0 'font-lock-function-name-face)
++ `(,(regexp-opt actionscript-global-props 'words) 0 'font-lock-variable-name-face)
+ ;; `(,(regexp-opt actionscript-symbol-operators) 0 'actionscript-operators-face)
+- `(,(regexp-opt actionscript-word-operators 'words) 0 'actionscript-operators-face)
+- `(,(regexp-opt actionscript-specifier-kwds 'words) 0 'actionscript-specifier-kwds-face)
+- `(,(regexp-opt actionscript-class-kwds 'words) 0 'actionscript-class-kwds-face)
+- `(,(regexp-opt actionscript-package-kwds 'words) 0 'actionscript-package-kwds-face)
+- `(,(regexp-opt actionscript-other-decl-kwds 'words) 0 'actionscript-other-decl-kwds-face)
+- `(,(regexp-opt actionscript-other-decl-2-kwds 'words) 0 'actionscript-other-decl-2-kwds-face)
+- `(,(regexp-opt actionscript-decl-level-kwds 'words) 0 'actionscript-decl-level-kwds-face)
+- `(,(regexp-opt actionscript-conditional-kwds 'words) 0 'actionscript-conditional-kwds-face)
+- `(,(regexp-opt actionscript-block-stmt-1-kwds 'words) 0 'actionscript-block-stmt-1-kwds-face)
+- `(,(regexp-opt actionscript-simple-stmt-kwds 'words) 0 'actionscript-simple-stmt-kwds-face)
+- `(,(regexp-opt actionscript-label-kwds 'words) 0 'actionscript-label-kwds-face)
+- `(,(regexp-opt actionscript-expr-kwds 'words) 0 'actionscript-expr-kwds-face)
+- `(,(regexp-opt actionscript-other-kwds 'words) 0 'actionscript-other-kwds-face))
++;; `(,(regexp-opt actionscript-word-operators 'words) 0 'font-lock--face)
++ `(,(regexp-opt actionscript-specifier-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-class-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-package-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-other-decl-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-other-decl-2-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-decl-level-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-conditional-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-block-stmt-1-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-simple-stmt-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-label-kwds 'words) 0 'font-lock-constant-face)
++ `(,(regexp-opt actionscript-expr-kwds 'words) 0 'font-lock-keyword-face)
++ `(,(regexp-opt actionscript-other-kwds 'words) 0 'font-lock-keyword-face))
+ "Subdued level highlighting for Actionscript mode.")
+
+ (defconst actionscript-font-lock-keywords-2
+@@ -394,24 +394,24 @@
+ ;; Fontify package names in import directives.
+ ;; TODO: support '*' as the last symbol in the package name.
+ (list (concat (regexp-opt actionscript-other-decl-kwds 'words) "[ \t]*\\(?:" actionscript-identifier-re "\\.\\)*\\(" actionscript-identifier-re "\\)?")
+- '(2 'actionscript-class-name-face nil t)
+- (list (concat "[ \t]*\\(" actionscript-identifier-re "\\)\\.") '(goto-char (match-end 1)) '(goto-char (match-end 0)) '(1 'actionscript-package-name-face nil t)))
++ '(2 'font-lock-type-face nil t)
++ (list (concat "[ \t]*\\(" actionscript-identifier-re "\\)\\.") '(goto-char (match-end 1)) '(goto-char (match-end 0)) '(1 'font-lock-constant-face nil t)))
+
+ ;; Fontify package names.
+ (list (concat (regexp-opt (append actionscript-package-kwds) 'words) "[ \t]*\\(" actionscript-identifier-re "\\)?")
+- '(2 'actionscript-package-name-face nil t))
++ '(2 'font-lock-constant-face nil t))
+
+ ;; Fontify class names.
+ (list (concat (regexp-opt (append actionscript-class-kwds actionscript-decl-level-kwds) 'words) "[ \t]*\\(" actionscript-identifier-re "\\)?")
+- '(2 'actionscript-class-name-face nil t))
++ '(2 'font-lock-type-face nil t))
+
+ ;; Function names.
+ (list (concat "\\<function\\>[ \t\n]+\\(?:\\(?:get\\|set\\)[ \t\n]+\\)?\\(?:\\(" actionscript-identifier-re "\\)\\)?")
+- '(1 'actionscript-function-name-face nil t))
++ '(1 'font-lock-function-name-face nil t))
+
+ ;; The 'in' in 'for..in.'
+ (list (concat "\\<for\\>[ \t\n]*([ \t\n]*\\(?:var[ \t\n]+\\)?" actionscript-identifier-re "[ \t\n]*\\(?::[ \t\n]*\\([a-zA-Z0-9_$*]*\\)\\)?[ \t\n]+\\(in\\)[ \t\n]+")
+- '(2 'actionscript-other-kwds-face nil t))
++ '(2 'font-lock-keyword-face nil t))
+
+ ;; The 'each' and the 'in' in 'for each..in.'
+ ;; (list (concat "\\<for\\>[ \t\n]+\\(?:\\(each\\)[ \t\n]*\\)([ \t\n]*\\(?:var[ \t\n]+\\)?" actionscript-identifier-re "[ \t\n]*\\(?::[ \t\n]*\\([a-zA-Z0-9_$*]*\\)\\)?[ \t\n]+\\(in\\)[ \t\n]+")
+@@ -428,7 +428,7 @@
+ ;; Start and finish with point after the type specifier.
+ (goto-char (match-beginning 1))
+ (goto-char (match-beginning 1))
+- (1 'actionscript-variable-name-face)))
++ (1 'font-lock-variable-name-face)))
+
+ ;; Objects and their functions
+ ;; package(s) class property
diff --git a/app-emacs/actionscript-mode/metadata.xml b/app-emacs/actionscript-mode/metadata.xml
new file mode 100644
index 0000000..1735496
--- /dev/null
+++ b/app-emacs/actionscript-mode/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gmail.com</email>
+ </maintainer>
+</pkgmetadata>