branch: elpa/drupal-mode
commit f0ae32d88a45b43cf22200d400a7188b00ed493c
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>

    Added first take at a `drush-make-mode'.
---
 Makefile           |  4 ++--
 drush-make-mode.el | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 4b9cbc3a38..bf4c94c194 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # This file is part of Drupal mode.
 
-# Copyright (C) 2012 Arne Jørgensen
+# Copyright (C) 2012, 2013 Arne Jørgensen
 
 # Author: Arne Jørgensen <[email protected]>
 
@@ -47,7 +47,7 @@ $(ARCHIVE_NAME)-pkg.el: $(ARCHIVE_NAME).el
                                (package-buffer-info))))"
 
 # create a tar ball in package.el format for uploading to 
http://marmalade-repo.org
-$(PACKAGE_NAME).tar: README $(ARCHIVE_NAME).el $(ARCHIVE_NAME)-pkg.el 
$(ARCHIVE_NAME).info dir drupal/*.el drupal-tests.el
+$(PACKAGE_NAME).tar: README $(ARCHIVE_NAME).el $(ARCHIVE_NAME)-pkg.el 
$(ARCHIVE_NAME).info dir drupal/*.el drupal-tests.el drush-make-mode.el
        tar -c -s "@^@$(PACKAGE_NAME)/@" -f $(PACKAGE_NAME).tar $^
 
 install: $(PACKAGE_NAME).tar
diff --git a/drush-make-mode.el b/drush-make-mode.el
new file mode 100644
index 0000000000..52d092a4c1
--- /dev/null
+++ b/drush-make-mode.el
@@ -0,0 +1,62 @@
+;;; drush-make-mode.el --- Major mode for drush make files
+
+;; Copyright (C) 2013  Arne Jørgensen
+
+;; Author: Arne Jørgensen <[email protected]>
+;; Keywords: languages, tools, extensions
+
+;; This file is part of Drupal mode.
+
+;; Drupal mode is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published
+;; by the Free Software Foundation, either version 3 of the License,
+;; or (at your option) any later version.
+
+;; Drupal mode is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with Drupal mode.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; A major mode for editing drush make files.
+
+;;; Code:
+
+;;;###autoload
+(define-derived-mode drush-make-mode conf-windows-mode "Drush Make"
+  "A major mode for editing drush make files.\n\n\\{drush-make-mode-map}"
+  :group 'drupal
+
+  ;; Use `bug-reference-mode' for linking issues and patches.
+  (set (make-local-variable 'bug-reference-url-format) 
"http://drupal.org/node/%s";)
+  (set (make-local-variable 'bug-reference-bug-regexp) 
"\\(?:\\#\\(?2:[0-9]+\\)\\|\\[['\"]?\\(?2:[0-9]+\\)\\(['\"]?\\]\\)\\)")
+  (bug-reference-mode)
+
+  ;; Use `goto-address-mode' for link highlighting.
+  (goto-address-mode)
+
+  ;; Setup and use `imenu' for building an index.
+  (setq imenu-generic-expression
+        '(("Libraries" "^libraries\\[\\([^]]+\\)\\]\\[download\\]\\[type\\] 
*=" 1)
+          ("Themes" "^projects\\[\\([^]]+\\)\\]\\[type\\] *= *theme" 1)        
           ("Modules" "^projects\\[\\([^]]+\\)\\]\\[type\\] *= *module" 1)
+          ("Profiles" "^projects\\[\\([^]]+\\)\\]\\[type\\] *= *profile" 1)
+          ("Sections" "^;;; \\(.*\\)" 1)))
+  (imenu-add-menubar-index)
+
+  ;; Enable general `drupal-mode'.
+  (drupal-mode))
+
+
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("[^/]\\.make\\'" . drush-make-mode))
+
+
+
+(provide 'drush-make-mode)
+
+;;; drush-make-mode.el ends here

Reply via email to