diff options
author | Christian Faulhammer <opfer@gentoo.org> | 2007-03-15 12:07:46 +0000 |
---|---|---|
committer | Christian Faulhammer <opfer@gentoo.org> | 2007-03-15 12:07:46 +0000 |
commit | d37847ae12651fffe63178237487f49006d1acf0 (patch) | |
tree | 2b8d46e5264e1bfe027687b5c182554601f1f102 /ebuild-mode.el | |
parent | ebuild-mode-1.3 (diff) | |
download | ebuild-mode-d37847ae12651fffe63178237487f49006d1acf0.tar.gz ebuild-mode-d37847ae12651fffe63178237487f49006d1acf0.tar.bz2 ebuild-mode-d37847ae12651fffe63178237487f49006d1acf0.zip |
version 1.4 addedreplaced
svn path=/emacs-extra/ebuild-mode/; revision=4
Diffstat (limited to 'ebuild-mode.el')
-rw-r--r-- | ebuild-mode.el | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/ebuild-mode.el b/ebuild-mode.el index ca2913b..9629d62 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -1,9 +1,10 @@ ;;; ebuild-mode.el --- a mode for editing Portage .ebuild, .eclass and .eselect files. -;; Copyright (C) 2003-2006 Gentoo Foundation +;; Copyright (C) 2003-2007 Gentoo Foundation ;; Author: Matthew Kennedy <mkennedy@gentoo.org> ;; Author: Diego Pettenò <flameeyes@gentoo.org> +;; Author: Christian Faulhammer <opfer@gentoo.org> ;; Keywords: convenience ;; This file is free software; you can redistribute it and/or modify @@ -21,19 +22,23 @@ ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -(defvar ebuild-mode-hook nil - "List of functions to call when entering ebuild-mode") - ;;; Commentary: ;; The commands have been grouped into lists of rough similarity. If ;; you can think of a better way to arrange these, please let us know. ;; We map each set of keywords to the basic faces: font-lock-*-face. +;; (add-to-list 'auto-mode-alist '("\\.\\(ebuild\\|eclass\\)\\'" . ebuild-mode)) +;; (add-to-list 'auto-mode-alist '("\\.eselect\\'" . eselect-mode)) + ;;; Code: +(defvar ebuild-mode-hook nil + "List of functions to call when entering ebuild-mode") + + (defvar ebuild-mode-commands-0 - '("use" "has_version" "best_version" "use_with" "use_enable" "check_KV" "keepdir" "econf" "die" "einstall" "elog" "einfo" "ewarn" "eerror" "diropts" "dobin" "docinto" "dodoc" "doexe" "dohard" "dohtml" "doinfo" "doins" "dolib" "dolib.a" "dolib.so" "doman" "dosbin" "dosym" "emake" "exeinto" "exeopts" "fowners" "fperms" "insinto" "insopts" "into" "libopts" "newbin" "newexe" "newins" "newman" "newsbin" "prepall" "prepalldocs" "prepallinfo" "prepallman" "prepallstrip" "has" "unpack" "dopython" "dosed" "into" "doinitd" "doconfd" "doenvd" "dojar" "domo" "dodir" "ebegin" "eend" "newconfd" "newdoc" "newenvd" "newinitd" "newlib.a" "newlib.so" "hasq" "hasv" "useq" "usev")) + '("use" "has_version" "best_version" "use_with" "use_enable" "check_KV" "keepdir" "econf" "die" "eerror" "einstall" "einfo" "elog" "ewarn" "diropts" "dobin" "docinto" "dodoc" "doexe" "dohard" "dohtml" "doinfo" "doins" "dolib" "dolib.a" "dolib.so" "doman" "dosbin" "dosym" "emake" "exeinto" "exeopts" "fowners" "fperms" "insinto" "insopts" "into" "libopts" "newbin" "newexe" "newins" "newman" "newsbin" "prepall" "prepalldocs" "prepallinfo" "prepallman" "prepallstrip" "has" "unpack" "dopython" "dosed" "into" "doinitd" "doconfd" "doenvd" "dojar" "domo" "dodir" "ebegin" "eend" "newconfd" "newdoc" "newenvd" "newinitd" "newlib.a" "newlib.so" "hasq" "hasv" "useq" "usev" "epause" "ebeep" "epatch" "enewuser" "enewgroup" "make_desktop_entry" "domenu" "doicon" "built_with_use")) (defvar ebuild-mode-commands-1 '("addread" "addwrite" "adddeny" "addpredict")) @@ -41,6 +46,12 @@ (defvar ebuild-mode-commands-2 '("inherit")) +(defvar ebuild-mode-commands-3 + '("filter-flags" "append-flags" "replace-flags" "replace-cpu-flags" "is-flag" "strip-flags" "strip-unsupported-flags" "get-flag" "filter-mfpmath" "append-ldflags" "filter-ldflags")) + +(defvar ebuild-mode-commands-4 + '("elisp-compile" "elisp-install" "elisp-site-file-install" "elisp-site-regen" "elisp-comp")) + (defun ebuild-mode-make-keywords-list (keywords-list face &optional prefix suffix) ;; based on `make-generic-keywords-list' from generic.el (unless (listp keywords-list) @@ -59,14 +70,15 @@ (font-lock-add-keywords 'ebuild-mode (list (ebuild-mode-make-keywords-list ebuild-mode-commands-0 'font-lock-type-face) (ebuild-mode-make-keywords-list ebuild-mode-commands-1 'font-lock-warning-face) - (ebuild-mode-make-keywords-list ebuild-mode-commands-2 'font-lock-type-face))) + (ebuild-mode-make-keywords-list ebuild-mode-commands-2 'font-lock-warning-face) + (ebuild-mode-make-keywords-list ebuild-mode-commands-3 'font-lock-type-face))) (add-hook 'write-file-functions 'delete-trailing-whitespace t t) (add-hook 'write-file-functions 'ebuild-mode-tabify t t) (setq tab-width 4 indent-tabs-mode t) - ;; run user-defined hooks - (run-hooks 'ebuild-mode-hook)) +;; run user-defined hooks +(run-hooks 'ebuild-mode-hook)) (defvar eselect-mode-commands-0 '("die" "is_function" "has")) @@ -84,7 +96,7 @@ '("write_error_msg" "write_list_start" "write_kv_list_entry" "write_numbered_list_entry" "write_numbered_list" "highlight" "highlight_warning" "space")) (defvar eselect-mode-commands-5 - '("is_number")) + '("is_number canonicalise")) (define-derived-mode eselect-mode shell-script-mode "Eselect" "Major mode for Portage .eselect files." @@ -119,10 +131,6 @@ (define-ebuild-mode-command "\C-cef" "fetch") (define-ebuild-mode-command "\C-ceu" "unpack") -;; (add-to-list 'auto-mode-alist '("\\.ebuild\\'" . ebuild-mode)) -;; (add-to-list 'auto-mode-alist '("\\.eclass\\'" . ebuild-mode)) -;; (add-to-list 'auto-mode-alist '("\\.eselect\\'" . eselect-mode)) - (provide 'ebuild-mode) ;;; ebuild-mode.el ends here |