branch: elpa/drupal-mode
commit dfd4582048d545d0b72fe88866e41b9d815ce2ae
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>
Fixed argument insert in `drupal-insert-hook'.
---
drupal-mode.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index 00c722f3c0..d05346efd2 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -414,22 +414,21 @@ should save your files with unix style end of line."
(funcall drupal-symbol-collection)
drupal-symbol-collection)
nil nil "hook_"))
- '(setq v2 (let ((case-fold-search nil)
- (hook v1)
- (form-id nil)
- (form-id-placeholder nil))
+ '(setq str v1)
+ '(setq v2 (let ((hook v1)
+ case-fold-search form-id form-id-placeholder)
(if (string-match "\\([A-Z][A-Z_]*[A-Z]\\)" hook)
(progn
(setq form-id-placeholder (match-string 1 hook))
(setq form-id (read-string
(concat "Implements " hook "() for (default
" form-id-placeholder "): ")
nil 'drupal-form-id-history
form-id-placeholder))
- (setq v1 (concat hook "() for " form-id))
+ (setq str (concat hook "() for " form-id))
(replace-regexp-in-string (regexp-quote
form-id-placeholder) form-id hook t))
hook)))
(drupal-ensure-newline)
"/**\n"
- " * Implements " v1 "().\n"
+ " * Implements " str "().\n"
" */\n"
"function " (replace-regexp-in-string "^hook" (drupal-module-name) v2) "("
(when drupal-get-function-args (funcall drupal-get-function-args v1
(drupal-major-version))) ") {\n"
" " @ _ "\n"