s-upper-camel-case error on modify-syntax-entry
xcwen opened this issue · 1 comments
xcwen commented
config "_" as word :
(modify-syntax-entry ?_ "w" c-mode-syntax-table)
(s-upper-camel-case "aa_bb") will get "Aa_bb"
do this is ok?!
(defun my-s-split-words (s)
"Split S into list of words."
(declare (side-effect-free t))
(s-split
"[^a-zA-Z0-9]+" ;; old: "[^[:word:]0-9]+"
(let ((case-fold-search nil))
(replace-regexp-in-string
"\\([[:lower:]]\\)\\([[:upper:]]\\)" "\\1 \\2"
(replace-regexp-in-string "\\([[:upper:]]\\)\\([[:upper:]][0-9[:lower:]]\\)" "\\1 \\2" s)))
t))