Skip to content

Commit dfd4582

Browse files
committed
Fixed argument insert in `drupal-insert-hook'.
1 parent a22be38 commit dfd4582

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drupal-mode.el

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,22 +414,21 @@ should save your files with unix style end of line."
414414
(funcall drupal-symbol-collection)
415415
drupal-symbol-collection)
416416
nil nil "hook_"))
417-
'(setq v2 (let ((case-fold-search nil)
418-
(hook v1)
419-
(form-id nil)
420-
(form-id-placeholder nil))
417+
'(setq str v1)
418+
'(setq v2 (let ((hook v1)
419+
case-fold-search form-id form-id-placeholder)
421420
(if (string-match "\\([A-Z][A-Z_]*[A-Z]\\)" hook)
422421
(progn
423422
(setq form-id-placeholder (match-string 1 hook))
424423
(setq form-id (read-string
425424
(concat "Implements " hook "() for (default " form-id-placeholder "): ")
426425
nil 'drupal-form-id-history form-id-placeholder))
427-
(setq v1 (concat hook "() for " form-id))
426+
(setq str (concat hook "() for " form-id))
428427
(replace-regexp-in-string (regexp-quote form-id-placeholder) form-id hook t))
429428
hook)))
430429
(drupal-ensure-newline)
431430
"/**\n"
432-
" * Implements " v1 "().\n"
431+
" * Implements " str "().\n"
433432
" */\n"
434433
"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"
435434
" " @ _ "\n"

0 commit comments

Comments
 (0)