branch: elpa/drupal-mode
commit b59ad24b6e62e891409a47240a186f1cf23be220
Merge: 708f318b12 0cd2412756
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>
Merge pull request #66 from joddie/fix/etags-hook-skeleton
Avoid "no tags containing" error in hook skeleton
---
drupal-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index f6c9476da6..63d32732ef 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -556,7 +556,8 @@ buffer."
(user-error "%s already exists in file." (replace-regexp-in-string "^hook"
(drupal-module-name) v2)))
;; User error if the hook is already inserted elsewhere.
(when (and drupal-get-function-args
- (funcall drupal-get-function-args (replace-regexp-in-string
"^hook" (drupal-module-name) v2)))
+ (ignore-errors
+ (funcall drupal-get-function-args (replace-regexp-in-string
"^hook" (drupal-module-name) v2))))
(user-error "%s already exists elsewhere." (replace-regexp-in-string
"^hook" (drupal-module-name) v2)))
(drupal-ensure-newline)
"/**\n"