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

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

[nongnu] elpa/drupal-mode 9ee19e25a8 269/308: Add autoinsert skeleton fo


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode 9ee19e25a8 269/308: Add autoinsert skeleton for Variable module support
Date: Tue, 25 Jan 2022 10:59:54 -0500 (EST)

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

    Add autoinsert skeleton for Variable module support
---
 drupal/autoinsert.el | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/drupal/autoinsert.el b/drupal/autoinsert.el
index cffea48331..3a32adaff0 100644
--- a/drupal/autoinsert.el
+++ b/drupal/autoinsert.el
@@ -1,6 +1,6 @@
 ;;; drupal/autoinsert.el --- Drupal-mode support for `auto-insert-mode'
 
-;; Copyright (C) 2012, 2013, 2014  Arne Jørgensen
+;; Copyright (C) 2012, 2013, 2014, 2015, 2016  Arne Jørgensen
 
 ;; Author: Arne Jørgensen <arne@arnested.dk>
 ;; Keywords:
@@ -31,6 +31,7 @@
 (define-auto-insert '("\\.install" . "Drupal install file") 
'drupal/autoinsert-insert-install-skeleton)
 (define-auto-insert '("\\.test" . "Drupal test file") 
'drupal/autoinsert-insert-test-skeleton)
 (define-auto-insert '("\\.api.php" . "Drupal API file") 
'drupal/autoinsert-insert-api-skeleton)
+(define-auto-insert '("\\.variable.inc" . "Drupal variable module support 
file") 'drupal/autoinsert-insert-variable-module-skeleton)
 
 (define-skeleton drupal/autoinsert-insert-info-skeleton
   "Drupal info file skeleton."
@@ -117,6 +118,52 @@
   " * @} End of \"addtogroup hooks\".\n"
   " */\n")
 
+(define-skeleton drupal/autoinsert-insert-variable-module-skeleton
+  "Drupal variable module support file."
+  nil
+  "<?php\n"
+  "\n"
+  "/**\n"
+  " * @file\n"
+  " * Variable module support for the " (drupal-module-name) " module.\n"
+  " */\n"
+  "\n"
+  "/**\n"
+  " * @addtogroup variables\n"
+  " * @{\n"
+  " */\n"
+  "\n"
+  "/**\n"
+  " * Implements hook_variable_info().\n"
+  " */\n"
+  "function " (drupal-module-name) "_variable_info($options) {\n"
+  "  $variables['" @ -  (drupal-module-name) "_some_variable'] = array(\n"
+  "    'type' => 'string',\n"
+  "    'title' => t('Some variable title', array(), $options),\n"
+  "    'default' => 'uid',\n"
+  "    'description' => t('Some variable description', array(), $options),\n"
+  "    'group' => '" (drupal-module-name) "',\n"
+  "  );\n"
+  "\n"
+  "  return $variables;\n"
+  "}\n"
+  "\n"
+  "/**\n"
+  " * Implements hook_variable_group_info().\n"
+  " */\n"
+  "function " (drupal-module-name) "_variable_group_info() {\n"
+  "  $groups['" (drupal-module-name) "'] = array(\n"
+  "    'title' => t('Some group title'),\n"
+  "    'description' => t('Some group description.'),\n"
+  "  );\n"
+  "\n"
+  "  return $groups;\n"
+  "}\n"
+  "\n"
+  "/**\n"
+  " * @} End of \"addtogroup variables\".\n"
+  " */\n")
+
 
 
 (provide 'drupal/autoinsert)



reply via email to

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