aboutsummaryrefslogtreecommitdiffstats
path: root/oni-php
diff options
context:
space:
mode:
Diffstat (limited to 'oni-php')
-rw-r--r--oni-php/snippets/php-mode/namespace6
1 files changed, 5 insertions, 1 deletions
diff --git a/oni-php/snippets/php-mode/namespace b/oni-php/snippets/php-mode/namespace
index a63d713..01abd02 100644
--- a/oni-php/snippets/php-mode/namespace
+++ b/oni-php/snippets/php-mode/namespace
@@ -2,4 +2,8 @@
# name: namespace
# key: ns
# --
-namespace ${1:`(string-join (mapcar #'capitalize (cdr (split-string (directory-file-name (file-name-directory (file-relative-name buffer-file-name (project-root (project-current))))) "/"))) "\\")`}; \ No newline at end of file
+namespace ${1:`(string-join
+ (mapcar
+ (lambda (s) (let ((case-fold-search nil)) (if (string-match-p (rx upper-case) s) s (capitalize s))))
+ (cdr (split-string (directory-file-name (file-name-directory (file-relative-name buffer-file-name (project-root (project-current))))) "/")))
+ "\\")`}; \ No newline at end of file