Created
January 1, 2011 18:02
-
-
Save perusio/761890 to your computer and use it in GitHub Desktop.
A Emacs Lisp skeleton for inserting a hook_views_api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-skeleton hook-views-api-skel | |
"Inserts a hook_views_api template in the current buffer." | |
nil | |
> "/**" \n | |
> -2 "* Implementation of hook_views_api().\n" | |
> "*/" \n | |
> "function " (setq v1 (skeleton-read "Module name: ")) "_views_api() {" \n | |
> "return array(" \n | |
> "'api' => " (setq v2 (skeleton-read "API version: ")) | "2" "," \n | |
> "'path' => drupal_get_path('module', '" v1 "') . " (setq v2 (skeleton-read "Path: ")) | "'/includes/views'" "," \n | |
> ");\n" | |
> -2 "} // " v1 "_views_api") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment