branch: elpa/drupal-mode
commit af2b2c5a76e660e6221fc41c885f437778ecfdcb
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>
Changed `replace-regexp-in-string` to `subst-char-in-string`.
---
drupal-mode.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index 84b49eada9..d7cfd03ee4 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -628,12 +628,12 @@ and encoded suitable for use as function name prefixes.
Used in `drupal-insert-hook' and `drupal-insert-function'."
(interactive)
- (let ((name (replace-regexp-in-string "-" "_"
- (if drupal-module
- drupal-module
- ;; Otherwise fall back to a very
naive
- ;; way of guessing the module name.
- (file-name-nondirectory
(file-name-sans-extension (buffer-file-name)))))))
+ (let ((name (subst-char-in-string ?- ?_
+ (if drupal-module
+ drupal-module
+ ;; Otherwise fall back to a very naive
+ ;; way of guessing the module name.
+ (file-name-nondirectory
(file-name-sans-extension (buffer-file-name)))))))
(if (called-interactively-p 'any)
(insert name)
name)))