We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d09cdf8 commit 9a6d362Copy full SHA for 9a6d362
drupal-mode.el
@@ -563,6 +563,10 @@ buffer."
563
(when (and (boundp 'imenu--index-alist)
564
(assoc (replace-regexp-in-string "^hook" (drupal-module-name) v2) (assoc "Named Functions" imenu--index-alist)))
565
(user-error "%s already exists in file." (replace-regexp-in-string "^hook" (drupal-module-name) v2)))
566
+ ;; User error if the hook is already inserted elsewhere.
567
+ (when (and drupal-get-function-args
568
+ (funcall drupal-get-function-args (replace-regexp-in-string "^hook" (drupal-module-name) v2)))
569
+ (user-error "%s already exists elsewhere." (replace-regexp-in-string "^hook" (drupal-module-name) v2)))
570
(drupal-ensure-newline)
571
"/**\n"
572
" * Implements " str "().\n"
0 commit comments