emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/drupal-mode 5e5f6e2782 084/308: Added drupal-mode support


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode 5e5f6e2782 084/308: Added drupal-mode support for `auto-insert-mode'.
Date: Tue, 25 Jan 2022 10:59:32 -0500 (EST)

branch: elpa/drupal-mode
commit 5e5f6e27824e8917e69448cfc58f422099b4abae
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>

    Added drupal-mode support for `auto-insert-mode'.
---
 drupal-mode.el       |  1 +
 drupal/autoinsert.el | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)

diff --git a/drupal-mode.el b/drupal-mode.el
index a973847ed3..5993035105 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -621,6 +621,7 @@ mode-hook."
 
 
 ;; Load support for various Emacs features if necessary.
+(eval-after-load 'autoinsert '(require 'drupal/autoinsert))
 (eval-after-load 'etags '(require 'drupal/etags))
 (eval-after-load 'gtags '(require 'drupal/gtags))
 (eval-after-load 'ispell '(require 'drupal/ispell))
diff --git a/drupal/autoinsert.el b/drupal/autoinsert.el
new file mode 100644
index 0000000000..e3c90411ac
--- /dev/null
+++ b/drupal/autoinsert.el
@@ -0,0 +1,54 @@
+;;; drupal/autoinsert.el --- Drupal-mode support for `auto-insert-mode'
+
+;; Copyright (C) 2012  Arne Jørgensen
+
+;; Author: Arne Jørgensen <arne@arnested.dk>
+;; Keywords: 
+
+;; 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:
+
+;; Enable drupal-mode support for `auto-insert-mode'.
+
+;;; Code:
+
+(define-auto-insert '("\\.info" . "Drupal info file") 
'drupal/autoinsert-insert-info-skeleton)
+(define-auto-insert '("\\.module" . "Drupal module file") 
'drupal/autoinsert-insert-module-skeleton)
+
+(define-skeleton drupal/autoinsert-insert-info-skeleton
+  "Drupal info skeleton."
+  nil
+  "name = " @ - "\n"
+  "description = " @ "\n"
+  "core = " (drupal-major-version) ".x\n")
+
+(define-skeleton drupal/autoinsert-insert-module-skeleton
+  "Drupal module skeleton."
+  nil
+  "<?php\n"
+  "\n"
+  "/**\n"
+  " * @file\n"
+  " * " @ - "\n"
+  " */\n"
+  "\n")
+
+
+
+(provide 'drupal/autoinsert)
+
+;;; drupal/autoinsert.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]